Commit 49d9b09e authored by catch's avatar catch
Browse files

Issue #3139436 by mondrake, jungle: Replace usages of...

Issue #3139436 by mondrake, jungle: Replace usages of AssertLegacyTrait::assertPattern, that is deprecated
parent 74ae4bdd
Loading
Loading
Loading
Loading
+1 −1
Changes for core/modules/book/tests/src/Functional/BookTestTrait.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ public function checkBookNode(EntityInterface $node, $nodes, $previous, $up, $ne

    // Check outline structure.
    if ($nodes !== NULL) {
      $this->assertPattern($this->generateOutlinePattern($nodes));
      $this->assertSession()->responseMatches($this->generateOutlinePattern($nodes));
    }

    // Check previous, up, and next links.
+1 −1
Changes for core/modules/color/tests/src/Functional/ColorTest.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ public function _testColor($theme, $test_values) {
    $stylesheets = $this->config('color.theme.' . $theme)->get('stylesheets');
    // Make sure the color stylesheet is included in the content.
    foreach ($stylesheets as $stylesheet) {
      $this->assertPattern('|' . file_url_transform_relative(file_create_url($stylesheet)) . '|');
      $this->assertSession()->responseMatches('|' . file_url_transform_relative(file_create_url($stylesheet)) . '|');
      $stylesheet_content = implode("\n", file($stylesheet));
      $this->assertStringContainsString('color: #123456', $stylesheet_content, 'Make sure the color we changed is in the color stylesheet. (' . $theme . ')');
    }
+1 −1
Changes for core/modules/comment/tests/src/Functional/CommentAnonymousTest.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -189,7 +189,7 @@ public function testAnonymous() {
    ]);
    $this->drupalGet('node/' . $this->node->id());
    // Verify that the comment field title is displayed.
    $this->assertPattern('@<h2[^>]*>Comments</h2>@');
    $this->assertSession()->responseMatches('@<h2[^>]*>Comments</h2>@');
    $this->assertSession()->linkExists('Log in', 1, 'Link to login was found.');
    $this->assertSession()->linkExists('register', 1, 'Link to register was found.');

+1 −1
Changes for core/modules/comment/tests/src/Functional/CommentInterfaceTest.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ public function testCommentInterface() {

    // Test the comment field title is displayed when there's comments.
    $this->drupalGet($this->node->toUrl());
    $this->assertPattern('@<h2[^>]*>Comments</h2>@');
    $this->assertSession()->responseMatches('@<h2[^>]*>Comments</h2>@');

    // Set comments to have subject and preview to required.
    $this->drupalLogout();
+1 −1
Changes for core/modules/comment/tests/src/Functional/CommentNonNodeTest.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -371,7 +371,7 @@ public function testCommentFunctionality() {
    ]);
    $this->drupalGet('entity_test/' . $this->entity->id());
    // Verify that the comment field title is displayed.
    $this->assertPattern('@<h2[^>]*>Comments</h2>@');
    $this->assertSession()->responseMatches('@<h2[^>]*>Comments</h2>@');
    $this->assertSession()->linkExists('Log in', 0, 'Link to login was found.');
    $this->assertSession()->linkExists('register', 0, 'Link to register was found.');
    $this->assertNoFieldByName('subject[0][value]', '', 'Subject field not found.');
Loading