protected function CommandLineOrUnsafeMethodTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/PageCache/CommandLineOrUnsafeMethodTest.php \Drupal\Tests\Core\PageCache\CommandLineOrUnsafeMethodTest::setUp()
- 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() : void {
// 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')
->onlyMethods([
'isCli',
])
->getMock();
}