$env = 'test_env';
$debug = true;
$kernel =
new KernelForTest($env,
$debug);
$expected = "O:57:\"Symfony\Component\HttpKernel\Tests\Fixtures\KernelForTest\":2:{s:14:\"\0*\0environment\";s:8:\"test_env\";s:8:\"\0*\0debug\";b:1;}";
$this->
assertEquals($expected,
serialize($kernel));
} public function testLocateResourceThrowsExceptionWhenNameIsNotValid() { $this->
expectException(\InvalidArgumentException::
class);
$this->
getKernel()->
locateResource('Foo'
);
} public function testLocateResourceThrowsExceptionWhenNameIsUnsafe() { $this->
expectException(\RuntimeException::
class);
$this->
getKernel()->
locateResource('@FooBundle/../bar'
);
} public function testLocateResourceThrowsExceptionWhenBundleDoesNotExist() { $this->
expectException(\InvalidArgumentException::
class);