From 3d3aab2e7fc54b4a4b34cd1a337b88d3d900e5b4 Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Sat, 9 May 2020 11:02:05 +0100 Subject: [PATCH] Issue #3134475 by Beakerboy, daffie: Avoid directly comparing string to blob in CommentIntegrationTest (cherry picked from commit 9d8849513f60b6d374d37b6390bca0f8ca3a56a6) --- .../comment/tests/src/Kernel/CommentIntegrationTest.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php b/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php index f8515549cd3..28c9b263cbd 100644 --- a/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php +++ b/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php @@ -119,14 +119,13 @@ class CommentIntegrationTest extends KernelTestBase { '@display' => EntityViewMode::load("comment.$mode")->label(), '@mode' => $mode, ]; - $logged = (bool) Database::getConnection()->select('watchdog') - ->fields('watchdog', ['wid']) + $logged = Database::getConnection()->select('watchdog') + ->fields('watchdog', ['variables']) ->condition('type', 'system') ->condition('message', "View display '@id': Comment field formatter '@name' was disabled because it is using the comment view display '@display' (@mode) that was just disabled.") - ->condition('variables', serialize($arguments)) ->execute() ->fetchField(); - $this->assertTrue($logged); + $this->assertEquals(serialize($arguments), $logged); // Re-enable the comment view display. EntityViewDisplay::load($comment_display_id)->setStatus(TRUE)->save();