Completed
Push — master ( 3e1f6e...114870 )
by Žilvinas
03:03
created

DocumentTypeGuesserTest::testNoTypeMatch()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
namespace Isign\Tests;
3
4
use Isign\DocumentTypeGuesser;
5
6
class DocumentTypeGuesserTest extends TestCase
7
{
8
    public function testPdfGuess()
9
    {
10
        $obj = new DocumentTypeGuesser();
11
        $type = $obj->guess(__DIR__ . '/data/document.pdf');
12
13
        $this->assertSame('pdf', $type);
14
    }
15
16
    /**
17
     * @expectedException Isign\Exception\NotSupportedDocumentType
18
     */
19
    public function testNoTypeMatch()
20
    {
21
        $obj = new DocumentTypeGuesser();
22
        $obj->setGuessers([]);
23
        $type = $obj->guess(__DIR__ . '/data/document.pdf');
24
25
        $this->assertSame(null, $type);
26
    }
27
}
28