Completed
Branch dev (ef719a)
by Dennis
02:05
created

AssetTestCase::getAssetDirectory()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/**
4
 * (c) Dennis Meckel
5
 *
6
 * For the full copyright and license information,
7
 * please view the LICENSE file that was distributed with this source code.
8
 */
9
10
namespace Rayne\wz2008\Graph\Test;
11
12
use PHPUnit\Framework\TestCase;
13
14
/**
15
 * Don't use this class except when writing unit tests depending on assets.
16
 *
17
 * @codeCoverageIgnore
18
 */
19
abstract class AssetTestCase extends TestCase
20
{
21
    /**
22
     * @return string
23
     */
24
    protected function getAssetDirectory()
25
    {
26
        return dirname(dirname(__DIR__)) . '/assets';
27
    }
28
29
    /**
30
     * @param string $file
31
     * @return string
32
     */
33
    protected function getAssetFile($file)
34
    {
35
        return $this->getAssetDirectory() . '/' . $file;
36
    }
37
}
38