diff options
| author | Sam Light <sam@lightscale.co.uk> | 2026-06-10 19:00:32 +0100 |
|---|---|---|
| committer | Sam Light <sam@lightscale.co.uk> | 2026-06-10 19:00:32 +0100 |
| commit | 7a19b83bf7d7d8a2650356168cdb296b6f82807f (patch) | |
| tree | 81891e5791d18daa8ec34497131fb65615039858 /tests/Unit/RouterTest.php | |
| parent | 8c0efd0d9317ad92bd55cd6afcd41bdbab827bf8 (diff) | |
code formatting
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(); |
