[FrameworkBundle] Returns the kernel instance in KernelTestCase::bootKernel
This commit is contained in:
parent
4a5f22bc1e
commit
da333a035d
@ -138,6 +138,8 @@ abstract class KernelTestCase extends TestCase
|
||||
* Boots the Kernel for this test.
|
||||
*
|
||||
* @param array $options
|
||||
*
|
||||
* @return KernelInterface A KernelInterface instance
|
||||
*/
|
||||
protected static function bootKernel(array $options = array())
|
||||
{
|
||||
@ -145,6 +147,8 @@ abstract class KernelTestCase extends TestCase
|
||||
|
||||
static::$kernel = static::createKernel($options);
|
||||
static::$kernel->boot();
|
||||
|
||||
return static::$kernel;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,9 +30,9 @@ abstract class WebTestCase extends KernelTestCase
|
||||
*/
|
||||
protected static function createClient(array $options = array(), array $server = array())
|
||||
{
|
||||
static::bootKernel($options);
|
||||
$kernel = static::bootKernel($options);
|
||||
|
||||
$client = static::$kernel->getContainer()->get('test.client');
|
||||
$client = $kernel->getContainer()->get('test.client');
|
||||
$client->setServerParameters($server);
|
||||
|
||||
return $client;
|
||||
|
Reference in New Issue
Block a user