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
To be able to use the container inside a
WebTestCaseyou need first to boot the kernel with: