function DocumentElement::hasContent

Same name in other branches
  1. 9 core/tests/Drupal/Tests/DocumentElement.php \Drupal\Tests\DocumentElement::hasContent()
  2. 10 core/tests/Drupal/Tests/DocumentElement.php \Drupal\Tests\DocumentElement::hasContent()

Check whether document has specified content.

Parameters

string $content:

Return value

bool

File

core/tests/Drupal/Tests/DocumentElement.php, line 50

Class

DocumentElement
Document element.

Namespace

Drupal\Tests

Code

public function hasContent($content) {
    return $this->has('named', [
        'content',
        $content,
    ]);
}

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