public function HtaccessTest::testSvgzContentEncoding in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/tests/src/Functional/System/HtaccessTest.php \Drupal\Tests\system\Functional\System\HtaccessTest::testSvgzContentEncoding()
- 10 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 152
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.
$header = $this
->drupalGetHeader('x-encoded-content-encoding');
$this
->assertEqual($header, 'gzip');
}