public function testLoadHtmlFile()
 {
     $file = __DIR__ . '/../fixtures/testpage.html';
     $document = new Document();
     $document->loadHtmlFile($file);
     $this->assertNotNull(count($document('div')));
     $document->load_file($file);
     $this->assertNotNull(count($document('div')));
     $document = Document::file_get_html($file);
     $this->assertNotNull(count($document('div')));
 }
 /**
  * @param $name
  * @param $arguments
  *
  * @return bool|Document
  */
 public static function __callStatic($name, $arguments)
 {
     if ($name == 'str_get_html') {
         $document = new Document();
         return $document->loadHtml($arguments[0]);
     }
     if ($name == 'file_get_html') {
         $document = new Document();
         return $document->loadHtmlFile($arguments[0]);
     }
     throw new BadMethodCallException('Method does not exist');
 }