From 26b8dbf35f22dcc18d35ba4953b7aa4da5090f87 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 6 Jun 2019 02:15:55 -0700 Subject: [PATCH] Revert "Fix Asset builder test by altering error_reporting level to match Drupal and changing regex to not care about HTTP version" This reverts commit be441aa368ef7f1e5a8dd115c065caa172f95a6a. --- tests/phpunit/E2E/Core/AssetBuilderTest.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/phpunit/E2E/Core/AssetBuilderTest.php b/tests/phpunit/E2E/Core/AssetBuilderTest.php index 4ddded6d47..19df9a3c1c 100644 --- a/tests/phpunit/E2E/Core/AssetBuilderTest.php +++ b/tests/phpunit/E2E/Core/AssetBuilderTest.php @@ -162,13 +162,9 @@ class AssetBuilderTest extends \CiviEndToEndTestCase { public function testInvalid() { \Civi::service('asset_builder')->setCacheEnabled(FALSE); $url = \Civi::service('asset_builder')->getUrl('invalid.json'); - // WordPress has different error reporting to Drupal so manually set to Drupal - $previousErrorReporting = error_reporting(1); $this->assertEmpty(file_get_contents($url)); - $this->assertNotEmpty(preg_grep(';HTTP/\d+.\d+ 404;', $http_response_header), + $this->assertNotEmpty(preg_grep(';HTTP/1.1 404;', $http_response_header), 'Expect to find HTTP 404. Found: ' . json_encode(preg_grep(';^HTTP;', $http_response_header))); - // Now Reset Error Reporting. - error_reporting($previousErrorReporting); } } -- 2.25.1