You are here

protected function AssertContentTrait::setRawContent in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/simpletest/src/AssertContentTrait.php \Drupal\simpletest\AssertContentTrait::setRawContent()

Sets the raw content (e.g. HTML).

Parameters

string $content: The raw content to set.

56 calls to AssertContentTrait::setRawContent()
AddFeedTest::testBasicFeedAddNoTitle in core/modules/system/src/Tests/Common/AddFeedTest.php
Tests attaching feeds with paths, URLs, and titles.
AreaEntityTest::doTestRender in core/modules/views/src/Tests/Handler/AreaEntityTest.php
Tests rendering the entity area handler.
AreaTest::testRenderEmptyHeaderFooter in core/modules/views/src/Tests/Handler/AreaTest.php
Tests that the header and footer areas are not rendered if empty.
BlockViewBuilderTest::testBlockViewBuilderViewAlter in core/modules/block/src/Tests/BlockViewBuilderTest.php
Tests block view altering.
BooleanFieldTest::testBooleanField in core/modules/field/src/Tests/Boolean/BooleanFieldTest.php
Tests boolean field.

... See full list

File

core/modules/simpletest/src/AssertContentTrait.php, line 65
Contains \Drupal\simpletest\AssertContentTrait.

Class

AssertContentTrait
Provides test methods to assert content.

Namespace

Drupal\simpletest

Code

protected function setRawContent($content) {
  $this->content = $content;
  $this->plainTextContent = NULL;
  $this->elements = NULL;
  $this->drupalSettings = array();
  if (preg_match('@<script type="application/json" data-drupal-selector="drupal-settings-json">([^<]*)</script>@', $content, $matches)) {
    $this->drupalSettings = Json::decode($matches[1]);
  }
}