当前配置
class_name: ApiTester
modules:
enabled:
- REST:
url: /
depends: Symfony
我希望配置如下。
class_name: ApiTester
modules:
enabled:
- REST:
url: dailyNotes.up // have any option for add url here. currently 404 error returns
depends: Symfony
我必须需要站点url进行测试,Api需要站点url以便codeception url必须需要设置。
对于生产,我想它不会每天都改变,所以你可以考虑只是创建一个参数,将保存网站的根url部分,并把它手动或…
你可以尝试在Symfony中称为表达式语言的东西,并将服务方法的结果作为服务参数直接注入到配置文件中。例如,我在服务配置文件中做同样的事情:
redirectUri: "@=service('router').generate('any_route_your_heart_desire', {}, 0)"
作为路由服务的第三个参数,你可以在这里传递一个来自UrlGeneratorInterface的常量值。
这里有一个文档链接:
http://symfony.com/doc/current/components/expression_language.htmlhttp://symfony.com/doc/current/service_container/expression_language.html
我希望它能帮助你。
干杯!