You are here

public function AllowToolbarPathTest::testAllowToolbarPath in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php \Drupal\Tests\toolbar\Unit\PageCache\AllowToolbarPathTest::testAllowToolbarPath()
  2. 9 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 33

Class

AllowToolbarPathTest
@coversDefaultClass \Drupal\toolbar\PageCache\AllowToolbarPath @group toolbar

Namespace

Drupal\Tests\toolbar\Unit\PageCache

Code

public function testAllowToolbarPath($expected_result, $path) {
  $request = Request::create($path);
  $result = $this->policy
    ->check($request);
  $this
    ->assertSame($expected_result, $result);
}