Unverified Commit 2c1c4e60 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3142749 by munish.kumar, shaktik, pavnish, sja112, ravi.shankar, Lal_,...

Issue #3142749 by munish.kumar, shaktik, pavnish, sja112, ravi.shankar, Lal_, mondrake, daffie, xjm: AssertLegacyTrait::assertPattern() calls in functional tests still have a message passed in

(cherry picked from commit 402567d1)
parent 3a730ce8
Loading
Loading
Loading
Loading
+1 −1
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), new FormattableMarkup('Node @number outline confirmed.', ['@number' => $number]));
      $this->assertPattern($this->generateOutlinePattern($nodes));
    }
    else {
      $this->pass(new FormattableMarkup('Node %number does not have outline.', ['%number' => $number]));
+2 −1
Original line number Diff line number Diff line
@@ -120,8 +120,9 @@ public function _testColor($theme, $test_values) {

    $this->drupalGet('<front>');
    $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)) . '|', 'Make sure the color stylesheet is included in the content. (' . $theme . ')');
      $this->assertPattern('|' . 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 . ')');
    }
+2 −1
Original line number Diff line number Diff line
@@ -188,7 +188,8 @@ public function testAnonymous() {
      'skip comment approval' => FALSE,
    ]);
    $this->drupalGet('node/' . $this->node->id());
    $this->assertPattern('@<h2[^>]*>Comments</h2>@', 'Comments were displayed.');
    // Verify that the comment field title is displayed.
    $this->assertPattern('@<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
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>@', 'Comments title is displayed.');
    $this->assertPattern('@<h2[^>]*>Comments</h2>@');

    // Set comments to have subject and preview to required.
    $this->drupalLogout();
+2 −1
Original line number Diff line number Diff line
@@ -370,7 +370,8 @@ public function testCommentFunctionality() {
      'skip comment approval' => FALSE,
    ]);
    $this->drupalGet('entity_test/' . $this->entity->id());
    $this->assertPattern('@<h2[^>]*>Comments</h2>@', 'Comments were displayed.');
    // Verify that the comment field title is displayed.
    $this->assertPattern('@<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