FilesystemTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A test() 0 22 1
1
<?php
2
3
namespace Test;
4
5
use Basis\Filesystem;
6
use Basis\Test;
7
8
class FilesystemTest extends Test
9
{
10
    public function test()
11
    {
12
        $filesystem = $this->app->get(Filesystem::class);
13
14
        $this->assertSame($filesystem->getPath(), getcwd());
15
        $this->assertSame($filesystem->getPath(''), getcwd());
16
17
        $this->assertSame($filesystem->getPath('config'), getcwd().'/config');
18
19
        $this->assertSame(
20
            $filesystem->getPath('config', 'administrator.php'),
21
            getcwd().'/config/administrator.php'
22
        );
23
24
        $this->assertSame(
25
            $filesystem->getPath('config'.DIRECTORY_SEPARATOR.'administrator.php'),
26
            getcwd().'/config/administrator.php'
27
        );
28
29
        $this->assertTrue($filesystem->exists('php', 'BusinessLogic.php'));
30
        $this->assertFalse($filesystem->exists('php', 'InvalidLogic.php'));
31
    }
32
}
33