public function KernelTest::testShutdownCallsShutdownOnAllBundles

File

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

Class

KernelTest

Namespace

Symfony\Component\HttpKernel\Tests

Code

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