protected function MongoDBLogTestCase::asText in MongoDB 8
Same name and namespace in other branches
- 6 mongodb_watchdog/mongodb_watchdog.test \MongoDBLogTestCase::asText()
- 7 mongodb_watchdog/mongodb_watchdog.test \MongoDBLogTestCase::asText()
Extract the text contained by the element.
Parameters
$element: Element to extract text from.
Return value
Extracted text.
1 call to MongoDBLogTestCase::asText()
- MongoDBLogTestCase::getLogEntries in mongodb_watchdog/mongodb_watchdog.test 
- Get the log entry information form the page.
File
- mongodb_watchdog/mongodb_watchdog.test, line 701 
- Test class for MongoDB_watchdog.
Class
- MongoDBLogTestCase
- Test the behaviour of watchdog() mongodb_watchdog, not dblog
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())));
}