setUriPattern('test/currentcontrollerexpressions/test(/{@action})'); $route->setDefaults([ '@package' => 'DigiComp.FluidCurrentControllerExpression', '@subpackage' => 'Tests\Functional\Fixtures', '@controller' => 'Test', '@action' => 'index', ]); $route->setAppendExceedingArguments(true); $this->router->addRoute($route); } /** * @test */ public function itReturnsCurrentControllerInformations(): void { $response = $this->browser->request('http://localhost/test/currentcontrollerexpressions/test'); static::assertEquals( 'Test index DigiComp.FluidCurrentControllerExpression Tests\Functional\Fixtures DigiComp\FluidCurrentControllerExpression\Tests\Functional\Fixtures\Controller\TestController html ', (string)$response->getBody() ); $response = $this->browser->request('http://localhost/test/currentcontrollerexpressions/test/withlayout'); static::assertEquals( 'Test withLayout DigiComp.FluidCurrentControllerExpression Tests\Functional\Fixtures DigiComp\FluidCurrentControllerExpression\Tests\Functional\Fixtures\Controller\TestController html ', (string)$response->getBody() ); } }