Browse Source

mock Kernel::getContainer()

Apparently, it is called and needs to return something.
Grégoire Paris 9 years ago
parent
commit
13040b58c8
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Tests/Command/GenerateAdminCommandTest.php

+ 4 - 0
Tests/Command/GenerateAdminCommandTest.php

@@ -72,6 +72,10 @@ class GenerateAdminCommandTest extends \PHPUnit_Framework_TestCase
             ->with($this->equalTo('AcmeDemoBundle'))
             ->will($this->returnValue($bundle));
 
+        $kernel->expects($this->any())
+            ->method('getContainer')
+            ->will($this->returnValue($this->container));
+
         $this->application = new Application($kernel);
         $this->command = new GenerateAdminCommand();