Commit fdb71536 authored by alexpott's avatar alexpott

Issue #2773389 by martin107, claudiu.cristea, klausi:...

Issue #2773389 by martin107, claudiu.cristea, klausi: BrowserTestBase::getTextContent() wrongly returns the raw content
parent 31747099
......@@ -33,6 +33,11 @@ public function testGoTo() {
// Test page contains some text.
$this->assertSession()->pageTextContains('Test page text.');
// Check that returned plain text is correct.
$text = $this->getTextContent();
$this->assertContains('Test page text.', $text);
$this->assertNotContains('</html>', $text);
// Response includes cache tags that we can assert.
$this->assertSession()->responseHeaderEquals('X-Drupal-Cache-Tags', 'rendered');
......@@ -1613,7 +1613,7 @@ protected function clickLink($label) {
* Retrieves the plain-text content from the current page.
protected function getTextContent() {
return $this->getSession()->getPage()->getContent();
return $this->getSession()->getPage()->getText();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment