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

DocumentTypeGuesserTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 22
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testPdfGuess() 0 7 1
A testNoTypeMatch() 0 8 1
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