Passed
Push — master ( ed297f...604ea4 )
by Giuliano
04:39
created

FindThemeTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 32
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetExistingTheme() 0 11 1
A testGetInexistingTheme() 0 7 1
1
<?php
2
3
namespace Maestriam\Samurai\Tests\Unit\Entities\Theme;
4
5
use Maestriam\Samurai\Entities\Theme;
6
7
/**
8
 * Testes de verificação de existência de tema
9
 */
10
class FindThemeTest extends ThemeTestCase
11
{
12
    /**
13
     * Verifica se retorna a instância de Theme, consegue recuperar os dados de um tema existente.  
14
     *
15
     * @return void
16
     */
17
    public function testGetExistingTheme()
18
    {
19
        $name = 'bands/lizzy-bourden';
20
        $theme1 = new Theme($name);
21
        
22
        $theme1->make();
23
        $theme2 = new Theme($name);        
24
        
25
        $ret = $theme2->find();
26
        
27
        $this->assertInstanceOf(Theme::class, $ret);
28
    }
29
    
30
    /**
31
     * Verifica se retorna nulo quando t
32
     *
33
     * @return void
34
     */
35
    public function testGetInexistingTheme()
36
    {
37
        $theme = new Theme('bands/lizzy-bourden');
38
        
39
        $ret = $theme->find();
40
41
        $this->assertNull($ret);
42
    }
43
}
44