diff --git a/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php b/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php index a088a8b..406d06f 100644 --- a/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php +++ b/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php @@ -97,7 +97,6 @@ public function buildByExtension($extension) { } else { $message = sprintf('The extension "%s" is not available.', $extension); - assert(false, $message); trigger_error($message, E_USER_WARNING); return; } diff --git a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php index b4186a5..9437784 100644 --- a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php +++ b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php @@ -191,16 +191,11 @@ public function testMissingExtension() { ->with('missing_extension') ->will($this->returnValue(FALSE)); - assert_options(ASSERT_ACTIVE, 0); set_error_handler(function($severity, $message, $file, $line) { $this->assertEquals($message, 'The extension "missing_extension" is not available.'); }); $this->assertEquals(NULL, $this->libraryDiscoveryParser->buildByExtension('missing_extension'), 'The extension "missing_extension" is not available'); restore_error_handler(); - - assert_options(ASSERT_ACTIVE, 1); - $this->setExpectedException('\AssertionError', 'The extension "missing_extension" is not available.'); - $this->libraryDiscoveryParser->buildByExtension('missing_extension'); } /**