Skip to content

Commit

Permalink
#27589 Expect exactly one greeting in the Template
Browse files Browse the repository at this point in the history
  • Loading branch information
lbajsarowicz committed Apr 5, 2020
1 parent 16cb18d commit f882122
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,10 @@ private function assertSameGreeting(string $expectedGreeting, EmailMessage $mess
$emailDom->loadHTML($messageContent);

$emailXpath = new \DOMXPath($emailDom);
$greeting = $emailXpath->query('//p[@class="greeting"]')->item(0);
$greeting = $emailXpath->query('//p[@class="greeting"]');

$this->assertSame($expectedGreeting, $greeting->textContent);
$this->assertSame(1, $greeting->length);
$this->assertSame($expectedGreeting, $greeting->item(0)->textContent);
}

/**
Expand Down

0 comments on commit f882122

Please sign in to comment.