diff --git a/console.rst b/console.rst index 37af8d1b040..9fa8cf6c92a 100644 --- a/console.rst +++ b/console.rst @@ -224,8 +224,8 @@ console:: { public function testExecute() { - self::bootKernel(); - $application = new Application(self::$kernel); + $kernel = self::bootKernel(); + $application = new Application($kernel); $application->add(new CreateUserCommand()); diff --git a/testing/doctrine.rst b/testing/doctrine.rst index dc477855b10..f7ab2898f3a 100644 --- a/testing/doctrine.rst +++ b/testing/doctrine.rst @@ -36,9 +36,9 @@ which makes all of this quite easy:: */ protected function setUp() { - self::bootKernel(); + $kernel = self::bootKernel(); - $this->em = static::$kernel->getContainer() + $this->em = $kernel->getContainer() ->get('doctrine') ->getManager(); }