Passed
Branch develop (84afed)
by Paulius
04:34 queued 02:36
created

DocumentTypeProviderTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 12
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetAllDocumentTypes() 0 5 1
A testGetPrimaryDocumentTypes() 0 3 1
1
<?php
2
namespace Dokobit\Gateway\Tests;
3
4
use Dokobit\Gateway\DocumentTypeProvider;
5
6
class DocumentTypeProviderTest extends TestCase
7
{
8
    public function testGetAllDocumentTypes()
9
    {
10
11
        $ref = new \ReflectionClass('Dokobit\Gateway\DocumentTypeProvider');
12
        $this->assertEquals(count($ref->getConstants()) - 1, count(DocumentTypeProvider::getAllDocumentTypes())); // -1 due to 'asic' not really being a separate file type
13
    }
14
15
    public function testGetPrimaryDocumentTypes()
16
    {
17
        $this->assertEquals(7, count(DocumentTypeProvider::getPrimaryDocumentTypes()));
18
    }
19
}
20