Completed
Push — master ( 3a2d63...6346ac )
by Albin
03:04
created

TestCase   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
getFilesystem() 0 1 ?
A testWithExistingFile() 0 7 1
A testWithNonExistentFile() 0 6 1
1
<?php
2
3
namespace Gaufrette\Extras\Tests\Resolvable\Resolver;
4
5
use Gaufrette\Extras\Resolvable\ResolvableFilesystem;
6
use PHPUnit\Framework\TestCase as BaseTestCase;
7
8
abstract class TestCase extends BaseTestCase
9
{
10
    /**
11
     * @return ResolvableFilesystem Should return a decorated filesystem
12
     */
13
    abstract protected function getFilesystem();
14
15
    public function testWithExistingFile()
16
    {
17
        $filesystem = $this->getFilesystem();
18
19
        $filesystem->write('foo/bar', '');
20
        $this->assertNotEmpty($filesystem->resolve('foo/bar'));
21
    }
22
23
    public function testWithNonExistentFile()
24
    {
25
        $filesystem = $this->getFilesystem();
26
27
        $this->assertNotEmpty($filesystem->resolve('baz'));
28
    }
29
}
30