diff options
Diffstat (limited to 'tests/Unit/RouterTest.php')
| -rw-r--r-- | tests/Unit/RouterTest.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/Unit/RouterTest.php b/tests/Unit/RouterTest.php index 12e27a4..421cc7c 100644 --- a/tests/Unit/RouterTest.php +++ b/tests/Unit/RouterTest.php @@ -17,12 +17,12 @@ it('initializes') ->toBeInstanceOf(Router::class); it('initializes with basic strategy') - ->expect((new Router)->getStrategy()) + ->expect((new Router())->getStrategy()) ->toBeInstanceOf(BasicStrategy::class); -it('can set strategy', function() { - $router = new Router; - $s = new BasicStrategy; +it('can set strategy', function () { + $router = new Router(); + $s = new BasicStrategy(); expect($router->getStrategy())->not->toBe($s); $router->setStrategy($s); expect($router->getStrategy())->toBe($s); @@ -109,7 +109,7 @@ it('return null when segment not found', function () { it('calls strategy notFound with dispatch', function () { $router = new Router(); - $factory = new Psr17Factory; + $factory = new Psr17Factory(); $request = $factory->createServerRequest(HttpMethod::Get->value, '/testing/testing'); $response = $factory->createResponse(); @@ -123,7 +123,7 @@ it('calls strategy notFound with dispatch', function () { expect($result)->toBe($response); }); -it('calls strategy runRoute with dispatch on match', function() { +it('calls strategy runRoute with dispatch on match', function () { $router = new Router(); $router->root()->child('testing')->addRoute(new Route( @@ -131,7 +131,7 @@ it('calls strategy runRoute with dispatch on match', function() { fn () => null, )); - $factory = new Psr17Factory; + $factory = new Psr17Factory(); $request = $factory->createServerRequest(HttpMethod::Get->value, '/testing'); $response = $factory->createResponse(); |
