diff --git a/core/modules/filter/src/Tests/FilterCrudTest.php b/core/modules/filter/src/Tests/FilterCrudTest.php index 55fe64d..00a25fc 100644 --- a/core/modules/filter/src/Tests/FilterCrudTest.php +++ b/core/modules/filter/src/Tests/FilterCrudTest.php @@ -79,15 +79,13 @@ function testTextFormatCrud() { */ public function testDisableFallbackFormat() { $this->installConfig(['filter']); - $message = "Exception \\LogicException (message \"The fallback text format 'plain_text' cannot be disabled.\") was thrown."; + $message = '\LogicException with message "The fallback text format \'plain_text\' cannot be disabled." was thrown.'; try { FilterFormat::load('plain_text')->disable(); $this->fail($message); } catch (\LogicException $e) { - if ($e->getMessage() == "The fallback text format 'plain_text' cannot be disabled.") { - $this->pass($message); - } + $this->assertIdentical($e->getMessage(), "The fallback text format 'plain_text' cannot be disabled.", $message); } }