Failed Conditions
Branch feature/refactoring-samurai (8cc7c1)
by Giuliano
03:49
created

CurrentThemeTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 31
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testInexistingCurrentTheme() 0 7 1
A testCurrentTheme() 0 9 1
1
<?php
2
3
namespace Maestriam\Samurai\Entities\Base;
4
5
use Maestriam\Samurai\Entities\Base;
6
use Maestriam\Samurai\Entities\Theme;
7
use Maestriam\Samurai\Tests\TestCase;
8
9
class CurrentThemeTest extends TestCase
10
{
11
    /**
12
     * Verifica se consegue retornar o tema padrão do projeto ao defini-lo.  
13
     *
14
     * @return void
15
     */
16
    public function testCurrentTheme()
17
    {        
18
        $theme1 = new Theme('bands/dokken');
19
        $theme1->make()->use();       
20
        
21
        $base = new Base();
22
        $theme2 = $base->current();
23
24
        $this->assertEquals($theme1->package(), $theme2->package());
25
    }
26
27
    /**
28
     * Verifica se retorna nulo ao tentar recuperar o tema padrão do 
29
     * projeto, sem ter defindo nenhum tema.  
30
     *
31
     * @return void
32
     */
33
    public function testInexistingCurrentTheme() : void
34
    {
35
        $base = new Base();
36
37
        $theme = $base->current();
38
39
        $this->assertNull($theme);
40
    }
41
}