-
-
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.
- feat: unit test for the new HttpWorker getter
- Loading branch information
1 parent
4402f93
commit 9592623
Showing
1 changed file
with
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?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, | ||
); | ||
|
||
ob_end_clean(); | ||
|
||
self::assertInstanceOf(HttpWorker::class, $psrWorker->getHttpWorker()); | ||
} | ||
} |