function DBLogTestCase::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 DBLogTestCase::asText()
DBLogTestCase::getLogEntries in modules/dblog/dblog.test
Gets the database log event information from the browser page.

File

modules/dblog/dblog.test, line 672

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

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