diff --git a/tests/RouteTest.php b/tests/RouteTest.php index 1ed9ee6..8c2c10d 100644 --- a/tests/RouteTest.php +++ b/tests/RouteTest.php @@ -56,10 +56,17 @@ public function testRouteExtra() public function testComplete() { $ctx = new Context(Request::create('/route_extra')); + /** @var Route $route */ $route = Route::i()->add(RequestCondition::i()->path('{pathname}')); + $route->addCompleteCallback( + function (Context $c) { + $c->meta()->set('completed', true); + } + ); $route->match($ctx); $route->complete($ctx); $this->assertEquals('route_extra', $ctx->routeData()->get('pathname')); + $this->assertTrue($ctx->meta()->getBoolean('completed')); } /**