コード例 #1
0
ファイル: DocumentTest.php プロジェクト: CELESTE77/maileva
 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;
 }
コード例 #2
0
ファイル: ContentTest.php プロジェクト: CELESTE77/maileva
 public function testValid()
 {
     $content = new Content();
     $content->setUri('elo.pdf');
     $content->verify();
 }