diff --git a/plugins/performance-lab/tests/includes/site-health/far-future-headers/test-far-future-headers.php b/plugins/performance-lab/tests/includes/site-health/far-future-headers/test-far-future-headers.php index 89484158d..593f8d8f5 100644 --- a/plugins/performance-lab/tests/includes/site-health/far-future-headers/test-far-future-headers.php +++ b/plugins/performance-lab/tests/includes/site-health/far-future-headers/test-far-future-headers.php @@ -91,8 +91,8 @@ public function test_status_messages(): void { ); $this->assertEquals( 'recommended', $result['final_status'] ); - $this->assertEquals( 'max-age below threshold', $result['details'][0]['reason'] ); - $this->assertEquals( 'expires below threshold', $result['details'][1]['reason'] ); + $this->assertStringContainsString( 'max-age below threshold (actual:', $result['details'][0]['reason'] ); + $this->assertStringContainsString( 'expires below threshold (actual:', $result['details'][1]['reason'] ); $this->assertEquals( 'No far-future headers but conditionally cached', $result['details'][2]['reason'] ); $this->assertEquals( 'No far-future headers and no conditional caching', $result['details'][3]['reason'] ); } @@ -135,9 +135,9 @@ static function () { ); $this->assertEquals( 'recommended', $result['final_status'] ); - $this->assertEquals( 'max-age below threshold', $result['details'][0]['reason'] ); - $this->assertEquals( 'expires below threshold', $result['details'][1]['reason'] ); - $this->assertEquals( 'max-age below threshold', $result['details'][2]['reason'] ); + $this->assertStringContainsString( 'max-age below threshold (actual:', $result['details'][0]['reason'] ); + $this->assertStringContainsString( 'expires below threshold (actual:', $result['details'][1]['reason'] ); + $this->assertStringContainsString( 'max-age below threshold (actual:', $result['details'][2]['reason'] ); } /**