protected function FieldTest::parseContent in Views (for Drupal 7) 8.3
Parse a content and return the html element.
Parameters
string $content: The html to parse.
Return value
array An array containing simplexml objects.
1 call to FieldTest::parseContent()
- FieldTest::xpathContent in lib/
Drupal/ views/ Tests/ Handler/ FieldTest.php  - Performs an xpath search on a certain content.
 
File
- lib/
Drupal/ views/ Tests/ Handler/ FieldTest.php, line 171  - Definition of Drupal\views\Tests\Handler\FieldTest.
 
Class
- FieldTest
 - Tests the generic field handler.
 
Namespace
Drupal\views\Tests\HandlerCode
protected function parseContent($content) {
  $htmlDom = new \DOMDocument();
  @$htmlDom
    ->loadHTML('<?xml encoding="UTF-8">' . $content);
  $elements = simplexml_import_dom($htmlDom);
  return $elements;
}