protected function RouteNormalizerRequestSubscriberTest::setUp in Redirect 8
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ RouteNormalizerRequestSubscriberTest.php, line 24
Class
- RouteNormalizerRequestSubscriberTest
- Tests the route normalizer.
Namespace
Drupal\Tests\redirect\UnitCode
protected function setUp() {
parent::setUp();
$kill_switch = $this
->createMock('\\Drupal\\Core\\PageCache\\ResponsePolicy\\KillSwitch');
$kill_switch
->expects($this
->any())
->method('trigger')
->withAnyParameters()
->will($this
->returnValue(NULL));
$container = new ContainerBuilder();
$container
->set('page_cache_kill_switch', $kill_switch);
\Drupal::setContainer($container);
}