Skip to content

Commit

Permalink
- feat: unit test for the new HttpWorker getter
Browse files Browse the repository at this point in the history
  • Loading branch information
FluffyDiscord committed Feb 1, 2024
1 parent 4402f93 commit 9592623
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/Unit/PSR7WorkerTest.php
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());
}
}

0 comments on commit 9592623

Please sign in to comment.