/**
  * @expectedException Isign\Exception\NotSupportedDocumentType
  */
 public function testNoTypeMatch()
 {
     $obj = new DocumentTypeGuesser();
     $obj->setGuessers([]);
     $type = $obj->guess(__DIR__ . '/data/document.pdf');
     $this->assertSame(null, $type);
 }
Beispiel #2
0
 public function testStatusOk()
 {
     $file = __DIR__ . '/../data/signed.pdf';
     $guesser = new DocumentTypeGuesser();
     $type = $guesser->guess($file);
     /** @var StatusResultInterface $statusResult */
     $statusResult = $this->client->get(new Check($type, $file));
     $this->assertSame(ResultInterface::STATUS_OK, $statusResult->getStatus());
     $this->assertNotEmpty($statusResult->getStructure());
 }