You are here

public function Html5Test::testLoad in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/masterminds/html5/test/HTML5/Html5Test.php \Masterminds\HTML5\Tests\Html5Test::testLoad()

File

vendor/masterminds/html5/test/HTML5/Html5Test.php, line 70

Class

Html5Test

Namespace

Masterminds\HTML5\Tests

Code

public function testLoad() {
  $dom = $this->html5
    ->load(__DIR__ . '/Html5Test.html');
  $this
    ->assertInstanceOf('\\DOMDocument', $dom);
  $this
    ->assertEmpty($this->html5
    ->getErrors());
  $this
    ->assertFalse($this->html5
    ->hasErrors());
  $file = fopen(__DIR__ . '/Html5Test.html', 'r');
  $dom = $this->html5
    ->load($file);
  $this
    ->assertInstanceOf('\\DOMDocument', $dom);
  $this
    ->assertEmpty($this->html5
    ->getErrors());
  $dom = $this->html5
    ->loadHTMLFile(__DIR__ . '/Html5Test.html');
  $this
    ->assertInstanceOf('\\DOMDocument', $dom);
  $this
    ->assertEmpty($this->html5
    ->getErrors());
}