function AllowToolbarPathTest::testAllowToolbarPath
Same name in other branches
- 9 core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php \Drupal\Tests\toolbar\Unit\PageCache\AllowToolbarPathTest::testAllowToolbarPath()
- 8.9.x core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php \Drupal\Tests\toolbar\Unit\PageCache\AllowToolbarPathTest::testAllowToolbarPath()
- 11.x core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php \Drupal\Tests\toolbar\Unit\PageCache\AllowToolbarPathTest::testAllowToolbarPath()
Asserts that caching is allowed if the request goes to toolbar subtree.
@dataProvider providerTestAllowToolbarPath @covers ::check
File
-
core/
modules/ toolbar/ tests/ src/ Unit/ PageCache/ AllowToolbarPathTest.php, line 40
Class
- AllowToolbarPathTest
- @coversDefaultClass \Drupal\toolbar\PageCache\AllowToolbarPath @group toolbar
Namespace
Drupal\Tests\toolbar\Unit\PageCacheCode
public function testAllowToolbarPath($expected_result, $path) : void {
$request = Request::create($path);
$result = $this->policy
->check($request);
$this->assertSame($expected_result, $result);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.