我需要为symfony 1.4应用程序提供功能测试。我有3个申请。前端(index.php)是空的,我不测试它。我想测试api
和backend
个应用程序。
功能测试的默认代码如下所示:
$browser->
get('/incomes/index')->
with('request')->begin()->
isParameter('module', 'incomes')->
isParameter('action', 'index')->
end()->
with('response')->begin()->
isStatusCode(200)->
checkElement('body', '!/This is a temporary page/')->
end()
;
问题是它似乎访问默认应用程序(frontend
)。如何访问其他应用程序?我尝试过这样的事情:
$browser->
get('/api.php/incomes/index')->
但都失败了。我在official docs ...
中找不到任何相关信息答案 0 :(得分:1)
从您所说的链接中,我可以看到test/bootstrap/functional.php
您尝试在php文件中测试的应用程序是从其文件路径猜测。
所以我的猜测是你的测试文件应该是一个包含应用程序名称的库。换句话说,您的测试文件路径应该在
中 test/functional/your_app/your_test_file