Unverified Commit e12e1ce8 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3142752 by sja112, mondrake, xjm, longwave:...

Issue #3142752 by sja112, mondrake, xjm, longwave: AssertLegacyTrait::assert(No)Escaped() in functional tests still have a message passed in

(cherry picked from commit 073679e7)
parent 48945fd2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -320,7 +320,7 @@ public function testFilterAdmin() {
    $edit['body[0][format]'] = $plain;
    $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save'));
    $this->drupalGet('node/' . $node->id());
    $this->assertEscaped($text, 'The "Plain text" text format escapes all HTML tags.');
    $this->assertEscaped($text);
    $this->config('filter.settings')
      ->set('always_show_fallback_choice', FALSE)
      ->save();
+1 −1
Original line number Diff line number Diff line
@@ -547,7 +547,7 @@ public function testForumWithNewPost() {
    $this->assertSession()->statusCodeEquals(200);

    // Verify there is no unintentional HTML tag escaping.
    $this->assertNoEscaped('<', '');
    $this->assertNoEscaped('<');
  }

  /**
+3 −3
Original line number Diff line number Diff line
@@ -137,10 +137,10 @@ protected function verifyHelp($response = 200) {
        foreach ($admin_tasks as $task) {
          $this->assertLink($task['title']);
          // Ensure there are no double escaped '&' or '<' characters.
          $this->assertNoEscaped('&amp;', 'The help text does not have double escaped &amp;.');
          $this->assertNoEscaped('&lt;', 'The help text does not have double escaped &lt;.');
          $this->assertNoEscaped('&amp;');
          $this->assertNoEscaped('&lt;');
          // Ensure there are no escaped '<' characters.
          $this->assertNoEscaped('<', 'The help text does not have single escaped &lt;.');
          $this->assertNoEscaped('<');
        }
        // Ensure there are no double escaped '&' or '<' characters.
        $this->assertNoEscaped('&amp;');
+2 −2
Original line number Diff line number Diff line
@@ -200,7 +200,7 @@ public function testPagePreview() {
    // Check that the preview is displaying the title, body and term.
    $expected_title = $edit[$title_key] . ' | Drupal';
    $this->assertSession()->titleEquals($expected_title);
    $this->assertEscaped($edit[$title_key], 'Title displayed and escaped.');
    $this->assertEscaped($edit[$title_key]);
    $this->assertText($edit[$body_key], 'Body displayed.');
    $this->assertText($edit[$term_key], 'Term displayed.');
    $this->assertLink(t('Back to content editing'));
@@ -240,7 +240,7 @@ public function testPagePreview() {
    // Return to page preview to check everything is as expected.
    $this->drupalPostForm(NULL, [], t('Preview'));
    $this->assertSession()->titleEquals($expected_title);
    $this->assertEscaped($edit[$title_key], 'Title displayed and escaped.');
    $this->assertEscaped($edit[$title_key]);
    $this->assertText($edit[$body_key], 'Body displayed.');
    $this->assertText($edit[$term_key], 'Term displayed.');
    $this->assertLink(t('Back to content editing'));
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ public function testSearchResultsComment() {
    // Verify that comment is rendered using proper format.
    $this->assertText($comment_body, 'Comment body text found in search results.');
    $this->assertNoRaw(t('n/a'), 'HTML in comment body is not hidden.');
    $this->assertNoEscaped($edit_comment['comment_body[0][value]'], 'HTML in comment body is not escaped.');
    $this->assertNoEscaped($edit_comment['comment_body[0][value]']);

    // Search for the evil script comment subject.
    $edit = [
Loading