Passed
Push — master ( c86ace...13d1a4 )
by Akmal
01:06
created

PathTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 3
1
<?php declare(strict_types=1);
2
3
namespace OpenEngine\Mika\Core\Helpers\Tests;
4
5
use OpenEngine\Mika\Core\Helpers\Path;
6
use PHPUnit\Framework\TestCase;
7
8
class PathTest extends TestCase
9
{
10
    public function testAbsolutePath(): void
11
    {
12
        Path::setRoot('/tmp');
13
        self::assertStringEndsWith('/tmp/akmal', Path::get('akmal'));
14
    }
15
16
    public function testRoot(): void
17
    {
18
        Path::setRoot(__DIR__);
19
        self::assertStringEndsWith(__DIR__, Path::getRoot());
20
    }
21
22
    public function testNames(): void
23
    {
24
        Path::setRoot('/tmp');
25
        Path::addName('src', 'src');
26
27
        self::assertStringEndsWith('/tmp/src', Path::getName('src'));
28
    }
29
}
30