I'm trying to setup a unit test but whenever I run "phpunit -c app" I get this error:
SymfonyComponentDependencyInjectionExceptionServiceNotFoundException: You have requested a non-existent service "test.client".
The code in my test case is just:
public function testNonAuthenticatedPathsIndex()
{
$client = $this->createClient();
}
If I don't make the call to createClient everything runs correctly. I've checked AppKernel.php to make sure the FrameworkBundle (I believe that's where this service is defined) is definitely still in there and it is.
I'm a bit confused as to what might be causing this as I've managed to do this kind of thing before.
Thanks for any help.
question from:
https://stackoverflow.com/questions/6213628/keep-getting-you-have-requested-a-non-existent-service-test-client-in-symfon 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…