function AllowToolbarPathTest::testAllowToolbarPath

Asserts that caching is allowed if the request goes to toolbar subtree.

@legacy-covers ::check

Attributes

#[DataProvider('providerTestAllowToolbarPath')]

File

core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php, line 43

Class

AllowToolbarPathTest
Tests Drupal\toolbar\PageCache\AllowToolbarPath.

Namespace

Drupal\Tests\toolbar\Unit\PageCache

Code

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.