Open soullivaneuh opened 7 years ago
I figured out the issue: I have some request override on parameters.yml
:
parameters:
router.request_context.host: 'localhost:8000'
router.request_context.scheme: http
router.request_context.base_url: /app_dev.php
This has to be overridden on config_test.yml
:
parameters:
router.request_context.base_url: ~
This are needed for offline URL generation like from commands and I don't think I'm the only one doing that.
It may be useful to add a tip to prevent people running into this issue.
I let this issue open, feel free to close it if you don't think it worth it.
On a simple web test case like this one:
$this->getUrl()
return the path prefixed byapp_dev.php
, making the test failing:The path should be returned without
app_dev.php
AFAIK. Origin Symfony web test case does not use this prefix for client calls.config_test.yml
file:phpunit.xml.dist
configuration file (no override):Composer state:
Tell me if you need more information.