protected function Fast404EventSubscriberTest::getFast404EventSubscriber in Fast 404 8
Same name and namespace in other branches
- 8.2 tests/src/Unit/Fast404EventSubscriberTest.php \Drupal\Tests\fast404\Unit\Fast404EventSubscriberTest::getFast404EventSubscriber()
Creates a Fast404EventSubscriber object to test.
Return value
\Drupal\fast404\EventSubscriber\Fast404EventSubscriber A mock Fast404EventSubscriber object to test.
1 call to Fast404EventSubscriberTest::getFast404EventSubscriber()
- Fast404EventSubscriberTest::testOnNotFoundException in tests/
src/ Unit/ Fast404EventSubscriberTest.php - Tests event handling for not found exceptions.
File
- tests/
src/ Unit/ Fast404EventSubscriberTest.php, line 62
Class
- Fast404EventSubscriberTest
- Tests the fast404 event subscriber logic.
Namespace
Drupal\Tests\fast404\UnitCode
protected function getFast404EventSubscriber() {
$requestStackStub = $this
->getMockBuilder('\\Symfony\\Component\\HttpFoundation\\RequestStack')
->disableOriginalConstructor()
->getMock();
$subscriber = $this
->getMockBuilder('\\Drupal\\fast404\\EventSubscriber\\Fast404EventSubscriber')
->setConstructorArgs([
$requestStackStub,
])
->getMock();
return $subscriber;
}