function SimpleTestTest::asText

Extract the text contained by the element.

Parameters

$element: Element to extract text from.

Return value

Extracted text.

2 calls to SimpleTestTest::asText()
SimpleTestTest::getResultFieldSet in drupal/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php
Get the details containing the results for group this test is in.
SimpleTestTest::getTestResults in drupal/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php
Get the results from a test and store them in the class array $results.

File

drupal/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php, line 321
Definition of Drupal\simpletest\Tests\SimpleTestTest.

Class

SimpleTestTest

Namespace

Drupal\simpletest\Tests

Code

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