public function InlineFragmentRendererTest::testRenderExceptionIgnoreErrors

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php, line 87

Class

InlineFragmentRendererTest

Namespace

Symfony\Component\HttpKernel\Fragment\Tests\FragmentRenderer

Code

public function testRenderExceptionIgnoreErrors() {
  $dispatcher = $this
    ->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface');
  $dispatcher
    ->expects($this
    ->once())
    ->method('dispatch')
    ->with(KernelEvents::EXCEPTION);
  $strategy = new InlineFragmentRenderer($this
    ->getKernel($this
    ->throwException(new \RuntimeException('foo'))), $dispatcher);
  $this
    ->assertEmpty($strategy
    ->render('/', Request::create('/'), array(
    'ignore_errors' => true,
  ))
    ->getContent());
}