Completed
Push — master ( 4783ce...1821eb )
by Dennis
03:38
created

BaseCase::getAssetFile()   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 1
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\Benchmark;
11
12
use RuntimeException;
13
14
abstract class BaseCase
15
{
16
    /**
17
     * @param $expected
18
     * @param $actual
19
     * @throws RuntimeException
20
     */
21
    protected function assertSame($expected, $actual)
22
    {
23
        if ($expected !== $actual) {
24
            throw new RuntimeException(sprintf('Expected `%s` but got `%s`.', $expected, $actual));
25
        }
26
    }
27
28
    /**
29
     * @param string $file
30
     * @return string
31
     */
32
    protected function getAssetFile($file)
33
    {
34
        return dirname(__DIR__) . '/assets/' . $file;
35
    }
36
}
37