I'm trying to test a service which takes the Symfony\Component\HttpKernel\Kernel
as a dependency.
This is what i do in order to mock the kernel.
$this->kernel = $this->getMock('Symfony\Component\HttpKernel\KernelInterface');
$this->kernel->expects($this->any())
->method('getEnvironment')
->will($this->returnValue('dev'));
When i run the test, i get something as the following error.
Fatal error: Cannot redeclare static foo\foo\WebTestCase::$kernel as non static foo\foo\MyTest::$kernel in ...
Any ideas why?