Completed
Pull Request — master (#71)
by
unknown
01:22
created

HeaderTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 4
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetPluralFormsCount() 0 6 1
A parseFile() 0 4 1
1
<?php
2
3
namespace Sepia\Test\UnitTest;
4
5
use PHPUnit\Framework\TestCase;
6
use Sepia\PoParser\Parser;
7
8
class HeaderTest extends TestCase
9
{
10
    public function testGetPluralFormsCount()
11
    {
12
        $catalog = $this->parseFile();
13
14
        $this->assertEquals(3, $catalog->getHeader()->getPluralFormsCount());
15
    }
16
17
18
    /**
19
     * @return \Sepia\PoParser\Catalog
20
     */
21
    protected function parseFile()
22
    {
23
        return Parser::parseFile(dirname(dirname(__DIR__)).'/fixtures/basicHeadersMultiline.po');
24
    }
25
}
26