AnyThemeTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 12
c 1
b 0
f 0
dl 0
loc 31
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testFindAnyThemeWithinFullDir() 0 9 1
A testFindAnyThemeWithinEmptyDir() 0 7 1
A testFindCurrentTheme() 0 9 1
1
<?php
2
3
namespace Maestriam\Samurai\Tests\Unit\Entities\Base;
4
5
use Maestriam\Samurai\Entities\Base;
6
use Maestriam\Samurai\Tests\TestCase;
7
8
class AnyThemeTest extends TestCase
9
{
10
    public function testFindAnyThemeWithinFullDir()
11
    {   
12
        $this->theme('bands/hardline')->findOrCreate();
13
14
        $base = new Base();
15
16
        $any = $base->any();
17
18
        $this->assertValidTheme($any);
19
    }    
20
21
    public function testFindAnyThemeWithinEmptyDir()
22
    {
23
        $base = new Base();
24
25
        $any = $base->any();
26
27
        $this->assertNull($any);
28
    }
29
30
    public function testFindCurrentTheme()
31
    {
32
        $this->theme('bands/hardline')->findOrCreate()->use();
33
34
        $base = new Base();
35
36
        $any = $base->any();
37
38
        $this->assertValidTheme($any);
39
    }
40
}