{"action":"created","issue":{"url":"https://api.github.com/repos/silexphp/Silex/issues/1442","repository_url":"https://api.github.com/repos/silexphp/Silex","labels_url":"https://api.github.com/repos/silexphp/Silex/issues/1442/labels{/name}","comments_url":"https://api.github.com/repos/silexphp/Silex/issues/1442/comments","events_url":"https://api.github.com/repos/silexphp/Silex/issues/1442/events","html_url":"https://github.com/silexphp/Silex/issues/1442","id":186353260,"number":1442,"title":"regular site routes work ... phpunit routes not found","user":{"login":"l0c0luke","id":339748,"avatar_url":"https://avatars.githubusercontent.com/u/339748?v=3","gravatar_id":"","url":"https://api.github.com/users/l0c0luke","html_url":"https://github.com/l0c0luke","followers_url":"https://api.github.com/users/l0c0luke/followers","following_url":"https://api.github.com/users/l0c0luke/following{/other_user}","gists_url":"https://api.github.com/users/l0c0luke/gists{/gist_id}","starred_url":"https://api.github.com/users/l0c0luke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/l0c0luke/subscriptions","organizations_url":"https://api.github.com/users/l0c0luke/orgs","repos_url":"https://api.github.com/users/l0c0luke/repos","events_url":"https://api.github.com/users/l0c0luke/events{/privacy}","received_events_url":"https://api.github.com/users/l0c0luke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-10-31T17:58:41Z","updated_at":"2016-11-02T10:03:12Z","closed_at":null,"body":"upgrading to silex 2 and symfony 3 and all the rest...\r\n\r\nroutes are included at end of app.php and look something like this...\r\n\r\n```\r\n$app->get('/', 'queue.controller:indexAction')\r\n    ->after(function (Request $request, Response $response, $app) {\r\n        $response->setPublic();\r\n        $response->setSharedMaxAge($app['cache']['s-maxage']);\r\n    })\r\n    ->host($app['domains']['xxx'])\r\n    ->bind('homepage');\r\n```\r\n\r\nthis works great in a browser, goto homepage, works fine. If I am running phpunit though... I get the following error when trying to generate a route...\r\n\r\n`Symfony\\Component\\Routing\\Exception\\RouteNotFoundException: Unable to generate a URL for the named route \"homepage\" as such route does not exist.`\r\n\r\nand the test looks something like this...\r\n\r\n```\r\npublic function testTargetingOnHomepage()\r\n    {\r\n        $client = $this->createClient();\r\n        echo $this->app->url('homepage');\r\n       .....\r\n    }\r\n```\r\n\r\ni am bewildered as to why my routes are not getting added to app when being executed from phpunit."},"comment":{"url":"https://api.github.com/repos/silexphp/Silex/issues/comments/257821548","html_url":"https://github.com/silexphp/Silex/issues/1442#issuecomment-257821548","issue_url":"https://api.github.com/repos/silexphp/Silex/issues/1442","id":257821548,"user":{"login":"stof","id":439401,"avatar_url":"https://avatars.githubusercontent.com/u/439401?v=3","gravatar_id":"","url":"https://api.github.com/users/stof","html_url":"https://github.com/stof","followers_url":"https://api.github.com/users/stof/followers","following_url":"https://api.github.com/users/stof/following{/other_user}","gists_url":"https://api.github.com/users/stof/gists{/gist_id}","starred_url":"https://api.github.com/users/stof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stof/subscriptions","organizations_url":"https://api.github.com/users/stof/orgs","repos_url":"https://api.github.com/users/stof/repos","events_url":"https://api.github.com/users/stof/events{/privacy}","received_events_url":"https://api.github.com/users/stof/received_events","type":"User","site_admin":false},"created_at":"2016-11-02T10:03:12Z","updated_at":"2016-11-02T10:03:12Z","body":"this is indeed done on purpose in https://github.com/silexphp/Silex/pull/862. Your testing code is precisely in the case where the behavior changed: generating URLs outside the handling of a request."}}
{"actor":{"display_login":"stof"}}