ThemeTest   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2
Metric Value
wmc 5
lcom 1
cbo 2
dl 0
loc 37
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 6 1
A it_should_return_name() 0 4 1
A it_should_return_name_in_lowercase() 0 4 1
A it_should_return_correct_path() 0 4 1
A getPath() 0 4 1
1
<?php namespace Modules\Core\Tests\Theme;
2
3
use Modules\Core\Foundation\Theme\Theme;
4
use Modules\Core\Tests\BaseTestCase;
5
6
class ThemeTest extends BaseTestCase
7
{
8
    /**
9
     * @var \Modules\Core\Foundation\Theme\Theme
10
     */
11
    protected $theme;
12
13
    public function setUp()
14
    {
15
        parent::setUp();
16
17
        $this->theme = new Theme('demo', $this->getPath());
18
    }
19
20
    /** @test */
21
    public function it_should_return_name()
22
    {
23
        $this->assertEquals('Demo', $this->theme->getName());
24
    }
25
26
    /** @test */
27
    public function it_should_return_name_in_lowercase()
28
    {
29
        $this->assertEquals('demo', $this->theme->getLowerName());
30
    }
31
32
    /** @test */
33
    public function it_should_return_correct_path()
34
    {
35
        $this->assertEquals($this->getPath(), $this->theme->getPath());
36
    }
37
38
    private function getPath()
39
    {
40
        return __DIR__ . '/Fixture/Themes/demo';
41
    }
42
}
43