public function DenyPrivateImageStyleDownloadTest::testPrivateImageStyleDownloadPolicy in Drupal 10
Same name and namespace in other branches
- 8 core/modules/image/tests/src/Unit/PageCache/DenyPrivateImageStyleDownloadTest.php \Drupal\Tests\image\Unit\PageCache\DenyPrivateImageStyleDownloadTest::testPrivateImageStyleDownloadPolicy()
- 9 core/modules/image/tests/src/Unit/PageCache/DenyPrivateImageStyleDownloadTest.php \Drupal\Tests\image\Unit\PageCache\DenyPrivateImageStyleDownloadTest::testPrivateImageStyleDownloadPolicy()
Asserts that caching is denied on the private image style download route.
@dataProvider providerPrivateImageStyleDownloadPolicy @covers ::check
File
- core/
modules/ image/ tests/ src/ Unit/ PageCache/ DenyPrivateImageStyleDownloadTest.php, line 58
Class
- DenyPrivateImageStyleDownloadTest
- @coversDefaultClass \Drupal\image\PageCache\DenyPrivateImageStyleDownload @group image
Namespace
Drupal\Tests\image\Unit\PageCacheCode
public function testPrivateImageStyleDownloadPolicy($expected_result, $route_name) {
$this->routeMatch
->expects($this
->once())
->method('getRouteName')
->will($this
->returnValue($route_name));
$actual_result = $this->policy
->check($this->response, $this->request);
$this
->assertSame($expected_result, $actual_result);
}