public static function getValidDocument($version) { $documents = self::validContent(); if (!isset($documents[$version])) { throw new Exception('Document is not valid'); } $document = new Document(); $document->setId($documents[$version][0]); $content = new Content(); $content->setUri($documents[$version][1]); $document->setContent($content); try { $document->verify(); } catch (Element $e) { throw new Exception('Document is not valid'); } return $document; }
public function testValid() { $content = new Content(); $content->setUri('elo.pdf'); $content->verify(); }