You are here

protected function DbLogTest::asText in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/dblog/src/Tests/DbLogTest.php \Drupal\dblog\Tests\DbLogTest::asText()

Extracts the text contained by the XHTML element.

Parameters

\SimpleXMLElement $element: Element to extract text from.

Return value

string Extracted text.

1 call to DbLogTest::asText()
DbLogTest::getLogEntries in core/modules/dblog/src/Tests/DbLogTest.php
Gets the database log event information from the browser page.

File

core/modules/dblog/src/Tests/DbLogTest.php, line 679
Contains \Drupal\dblog\Tests\DbLogTest.

Class

DbLogTest
Generate events and verify dblog entries; verify user access to log reports based on permissions.

Namespace

Drupal\dblog\Tests

Code

protected function asText(\SimpleXMLElement $element) {
  if (!is_object($element)) {
    return $this
      ->fail('The element is not an element.');
  }
  return trim(html_entity_decode(strip_tags($element
    ->asXML())));
}