protected function CommandLineOrUnsafeMethodTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/PageCache/CommandLineOrUnsafeMethodTest.php \Drupal\Tests\Core\PageCache\CommandLineOrUnsafeMethodTest::setUp()
Overrides UnitTestCase::setUp
File
- core/
tests/ Drupal/ Tests/ Core/ PageCache/ CommandLineOrUnsafeMethodTest.php, line 22
Class
- CommandLineOrUnsafeMethodTest
- @coversDefaultClass \Drupal\Core\PageCache\RequestPolicy\CommandLineOrUnsafeMethod @group PageCache
Namespace
Drupal\Tests\Core\PageCacheCode
protected function setUp() {
// Note that it is necessary to partially mock the class under test in
// order to disable the isCli-check.
$this->policy = $this
->getMockBuilder('Drupal\\Core\\PageCache\\RequestPolicy\\CommandLineOrUnsafeMethod')
->setMethods([
'isCli',
])
->getMock();
}