CurrentThemeTest::testInexistingCurrentTheme()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 7
rs 10
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
}