protected function Fast404Test::getFast404 in Fast 404 8
Same name and namespace in other branches
- 8.2 tests/src/Unit/Fast404Test.php \Drupal\Tests\fast404\Unit\Fast404Test::getFast404()
Creates a fast404 object to test.
Return value
\Drupal\fast404\Fast404 A mock fast404 object to test.
2 calls to Fast404Test::getFast404()
- Fast404Test::testBlockPath in tests/
src/ Unit/ Fast404Test.php - Tests blocking a path.
- Fast404Test::testIsPathBlocked in tests/
src/ Unit/ Fast404Test.php - Tests checking if a path is blocked.
File
- tests/
src/ Unit/ Fast404Test.php, line 21
Class
- Fast404Test
- Tests Fast404 methods.
Namespace
Drupal\Tests\fast404\UnitCode
protected function getFast404() {
$requestStub = $this
->getMockBuilder('\\Symfony\\Component\\HttpFoundation\\Request')
->disableOriginalConstructor()
->getMock();
$fast404 = $this
->getMockBuilder('\\Drupal\\fast404\\Fast404')
->setConstructorArgs([
$requestStub,
])
->setMethods([
'isCli',
])
->getMock();
$fast404
->method('isCli')
->willReturn(FALSE);
return $fast404;
}