Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 public function testValid()
 {
     $content = new Content();
     $content->setUri('elo.pdf');
     $content->verify();
 }