protected function 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 drupal/core/modules/dblog/lib/Drupal/dblog/Tests/DBLogTest.php
Gets the database log event information from the browser page.

File

drupal/core/modules/dblog/lib/Drupal/dblog/Tests/DBLogTest.php, line 620
Definition of Drupal\dblog\Tests\DBLogTest.

Class

DBLogTest
Tests logging messages to the database.

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())));
}