markTestSkipped('gzencode not available'); } putenv('COMPRESSION_ENABLED=true'); $kernel = new Kernel(); $request = (new ServerRequest('GET', '/_phred/health')) ->withHeader('Accept-Encoding', 'gzip'); $response = $kernel->handle($request); $this->assertEquals('gzip', $response->getHeaderLine('Content-Encoding')); $this->assertNotEmpty($response->getBody()->getContents()); } public function test_compression_is_not_applied_when_disabled(): void { putenv('COMPRESSION_ENABLED=false'); $kernel = new Kernel(); $request = (new ServerRequest('GET', '/_phred/health')) ->withHeader('Accept-Encoding', 'gzip'); $response = $kernel->handle($request); $this->assertFalse($response->hasHeader('Content-Encoding')); } }