public function HtaccessTest::testSvgzContentEncoding in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Functional/System/HtaccessTest.php \Drupal\Tests\system\Functional\System\HtaccessTest::testSvgzContentEncoding()
- 9 core/modules/system/tests/src/Functional/System/HtaccessTest.php \Drupal\Tests\system\Functional\System\HtaccessTest::testSvgzContentEncoding()
Tests that SVGZ files are served with Content-Encoding: gzip.
File
- core/
modules/ system/ tests/ src/ Functional/ System/ HtaccessTest.php, line 154
Class
- HtaccessTest
- Tests .htaccess is working correctly.
Namespace
Drupal\Tests\system\Functional\SystemCode
public function testSvgzContentEncoding() {
$this
->drupalGet('core/modules/system/tests/logo.svgz');
$this
->assertSession()
->statusCodeEquals(200);
// Use x-encoded-content-encoding because of Content-Encoding responses
// (gzip, deflate, etc.) are automatically decoded by Guzzle.
$this
->assertSession()
->responseHeaderEquals('x-encoded-content-encoding', 'gzip');
}