Passed
Push — zero-is-false ( 5bf3f2...d7e1e1 )
by Sam
08:16
created

ModuleTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testResourcesDir() 0 5 1
A testUnsetResourcesDir() 0 5 1
1
<?php
2
3
namespace SilverStripe\Core\Tests\Manifest;
4
5
use SilverStripe\Control\Director;
6
use SilverStripe\Core\Manifest\Module;
7
use SilverStripe\Dev\SapphireTest;
8
9
class ModuleTest extends SapphireTest
10
{
11
    public function testUnsetResourcesDir()
12
    {
13
        $path = __DIR__ . '/fixtures/ss-projects/withoutCustomResourcesDir';
14
        $module = new Module($path, $path);
15
        $this->assertEquals('', $module->getResourcesDir());
16
    }
17
18
    public function testResourcesDir()
19
    {
20
        $path = __DIR__ . '/fixtures/ss-projects/withCustomResourcesDir';
21
        $module = new Module($path, $path);
22
        $this->assertEquals('customised-resources-dir', $module->getResourcesDir());
23
    }
24
}
25