public function KernelTest::testBootKernelSeveralTimesOnlyInitializesBundlesOnce

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/KernelTest.php, line 111

Class

KernelTest

Namespace

Symfony\Component\HttpKernel\Tests

Code

public function testBootKernelSeveralTimesOnlyInitializesBundlesOnce() {
  $kernel = $this
    ->getMockBuilder('Symfony\\Component\\HttpKernel\\Tests\\Fixtures\\KernelForTest')
    ->disableOriginalConstructor()
    ->setMethods(array(
    'initializeBundles',
    'initializeContainer',
    'getBundles',
  ))
    ->getMock();
  $kernel
    ->expects($this
    ->once())
    ->method('getBundles')
    ->will($this
    ->returnValue(array()));
  $kernel
    ->boot();
  $kernel
    ->boot();
}