1 dblog.test protected DBLogTestCase::asText(SimpleXMLElement $element)

Extracts the text contained by the XHTML element.

Parameters

SimpleXMLElement $element: Element to extract text from.

Return value

string: Extracted text.

File

core/modules/dblog/tests/dblog.test, line 653
Tests for dblog.module.

Class

DBLogTestCase
Tests logging messages to the database.

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