Completed
Push — develop ( b39607 )
by Raúl
16s
created

AbstractFixtureTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A parseFile() 0 8 1
1
<?php
2
3
namespace Sepia\Test;
4
5
use PHPUnit\Framework\TestCase;
6
use Sepia\PoParser\Parser;
7
8
abstract class AbstractFixtureTest extends TestCase
9
{
10
    /** @var string */
11
    protected $resourcesPath;
12
13
    public function setUp()
14
    {
15
        $this->resourcesPath = dirname(__DIR__).'/fixtures/';
16
    }
17
18
    /**
19
     * @param string $file
20
     *
21
     * @return \Sepia\PoParser\CatalogArray
22
     */
23
    protected function parseFile($file)
24
    {
25
        //try {
26
            return Parser::parseFile($this->resourcesPath.$file);
27
        //} catch (\Exception $e) {
28
        //    $this->fail($e->getMessage());
29
        //}
30
    }
31
}
32