.../src/Unit/Plugin/DisplayVariant/BlockPageVariantTest.php | 9 +++++++-- core/modules/comment/src/Tests/CommentTestBase.php | 9 +-------- core/modules/system/templates/container--main-content.html.twig | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/core/modules/block/tests/src/Unit/Plugin/DisplayVariant/BlockPageVariantTest.php b/core/modules/block/tests/src/Unit/Plugin/DisplayVariant/BlockPageVariantTest.php index 22f3a3e..d83c2ca 100644 --- a/core/modules/block/tests/src/Unit/Plugin/DisplayVariant/BlockPageVariantTest.php +++ b/core/modules/block/tests/src/Unit/Plugin/DisplayVariant/BlockPageVariantTest.php @@ -186,7 +186,10 @@ public function providerBuild() { // The main content, messages and title are rendered via the fallback in case // there are no blocks rendering them. 'content' => [ - 'system_main' => ['#markup' => 'Hello kittens!'], + 'system_main' => [ + '#markup' => 'Hello kittens!', + '#theme_wrappers' => ['container__main_content'], + ], 'messages' => [ '#weight' => -1000, '#type' => 'status_messages', @@ -264,7 +267,9 @@ public function testBuildWithoutMainContent() { 'max-age' => -1, ], 'content' => [ - 'system_main' => [], + 'system_main' => [ + '#theme_wrappers' => ['container__main_content'], + ], 'messages' => [ '#weight' => -1000, '#type' => 'status_messages', diff --git a/core/modules/comment/src/Tests/CommentTestBase.php b/core/modules/comment/src/Tests/CommentTestBase.php index 12ea894..f78a8bd 100644 --- a/core/modules/comment/src/Tests/CommentTestBase.php +++ b/core/modules/comment/src/Tests/CommentTestBase.php @@ -188,14 +188,7 @@ public function postComment($entity, $comment, $subject = '', $contact = NULL, $ */ function commentExists(CommentInterface $comment = NULL, $reply = FALSE) { if ($comment) { - $regex = '!' . ($reply ? '
(.*?)' : ''); - $regex .= 'getSubject() . '(.*?)'; - $regex .= $comment->comment_body->value . '(.*?)'; - $regex .= ($reply ? '\s
(.*?)' : ''); - $regex .= '!s'; - - return (boolean) preg_match($regex, $this->getRawContent()); + return (bool) $this->cssSelect('.comment-wrapper ' . ($reply ? '.indented ' : '') . '#comment-' . $comment->id()); } else { return FALSE; diff --git a/core/modules/system/templates/container--main-content.html.twig b/core/modules/system/templates/container--main-content.html.twig index 9db3e4f..ad841a9 100644 --- a/core/modules/system/templates/container--main-content.html.twig +++ b/core/modules/system/templates/container--main-content.html.twig @@ -9,4 +9,4 @@ * @ingroup themeable */ #} -
{{ title_suffix }}{{ children }}
+{{ title_suffix }}{{ children }}