I need to provide functional tests for a symfony 1.4 application. I've got 3 applications. Frontend (index.php) is empty and I do not test it. I want to test api
and backend
applications.
The default code for a functional test looks like the following:
$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()
;
The problem is that it seems to access the default application (frontend
). What can I do to access another application? I've tried things like:
$browser->
get('/api.php/incomes/index')->
but all failed. I couldn't find any info about this in the official docs...
From the link you stated, I can see from test/bootstrap/functional.php
that the application you try to test in your php file is guessed from its filepath.
So my guess is that your test file should be in a repertory with the name of your application. In other words, your test filepath should be in
test/functional/your_app/your_test_file