-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21: add getter for the
PSR7Worker->httpWorker
p…
…roperty
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
namespace Spiral\RoadRunner\Tests\Http\Unit; | ||
|
||
use Nyholm\Psr7\Factory\Psr17Factory; | ||
use PHPUnit\Framework\TestCase; | ||
use Spiral\RoadRunner\Http\HttpWorker; | ||
use Spiral\RoadRunner\Http\PSR7Worker; | ||
use Spiral\RoadRunner\Worker; | ||
|
||
class PSR7WorkerTest extends TestCase | ||
{ | ||
public function testHttpWorkerIsAvailable(): void | ||
{ | ||
$psrFactory = new Psr17Factory(); | ||
|
||
$psrWorker = new PSR7Worker( | ||
Worker::create(), | ||
$psrFactory, | ||
$psrFactory, | ||
$psrFactory, | ||
); | ||
|
||
self::assertInstanceOf(HttpWorker::class, $psrWorker->getHttpWorker()); | ||
} | ||
|
||
protected function tearDown(): void | ||
{ | ||
// Clean all extra output buffers | ||
$level = \ob_get_level(); | ||
while (--$level > 0) { | ||
\ob_end_clean(); | ||
} | ||
|
||
parent::tearDown(); // TODO: Change the autogenerated stub | ||
} | ||
} |