function BrowserTestBaseTest::testGetRawContent

Same name and namespace in other branches
  1. 8.9.x core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php \Drupal\FunctionalTests\BrowserTestBaseTest::testGetRawContent()

Tests legacy getRawContent().

@group legacy

File

core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php, line 348

Class

BrowserTestBaseTest
Tests BrowserTestBase functionality.

Namespace

Drupal\FunctionalTests

Code

public function testGetRawContent() {
    $this->expectDeprecation('AssertLegacyTrait::getRawContent() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->getSession()->getPage()->getContent() instead. See https://www.drupal.org/node/3129738');
    $this->drupalGet('test-encoded');
    $this->assertSame($this->getSession()
        ->getPage()
        ->getContent(), $this->getRawContent());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.