I'm trying to achieve generated routes in my functional tests. I want them to be generated dynamically,preferably by name, but I cannot find a proper way how to do it. Point me please.
A simple test:
public function testIndex()
{
// I have service container
$container = $this->client->getContainer();
$crawler = $client->request('GET', helper_function("route_name", $params));
$heading = $crawler->filter('h1')->eq(0)->text();
$this->assertEquals('Application list', $heading);
}
What that helper_function()
should be?