expect(fn () => new BasicStrategy()) ->toBeInstanceOf(BasicStrategy::class); it('throws on not found', function () { (new BasicStrategy())->notFound( (new Psr17Factory())->createServerRequest( HttpMethod::Get->value, '/testing/testing' ) ); })->throws(NotFoundException::class); it('calls route', function () { $factory = new Psr17Factory(); $response = $factory->createResponse(200, 'OK'); $cb = TestCallable::make(fn () => $response); $res = (new BasicStrategy())->runRoute($rc = new RouteCall( $factory->createServerRequest( HttpMethod::Get->value, '/testing/testing' ), new Route( HttpMethod::Get, $cb ), [] )); $cb->assertCalled(); $call = $cb->getLastCall(); expect($call->args[0] ?? null)->toBe($rc); expect($res)->toBe($response); }); it('runs middleware', function() { $factory = new });