use Liip\FunctionalTestBundle\Test\WebTestCase;
class ControllerTest extends WebTestCase
{
public function testSuccess()
{
$url = $this->getContainer()->get('router')
->generate('name_route', array('parameter' => ' '));
$this->client->request('GET', $url,
array(),
array(),
array(
'HTTP_parameter_Header' => 'paramterHeader',
)
);
}
}
After I launched the test, I have an error:
Call to a member function getContainer() on a non-object
Just get AppKernel inside your test case
and the then get the container and everthing else
I'd suggest you put this into a base class and extends it in all your test cases :)