ExistsThemeTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testExistsTheme() 0 10 1
A testNotExistsTheme() 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 ExistsThemeTest extends ThemeTestCase
11
{
12
    /**
13
     * Verifica se o tema existe na base, depois do comando de criação
14
     *
15
     * @return void
16
     */
17
    public function testExistsTheme()
18
    {
19
        $theme = new Theme('bands/whitesnake');
20
21
        $theme->make();
22
23
        $exists = $theme->exists();
24
        
25
        $this->assertTrue($exists);
26
        $this->assertIsBool($exists);
27
    }
28
    
29
    /**
30
     * Verifica se o tema existe na base, sem ele não ter criado
31
     *
32
     * @return void
33
     */
34
    public function testNotExistsTheme()
35
    {
36
        $theme = new Theme('bands/white-znake');
37
        
38
        $exists = $theme->exists();
39
40
        $this->assertFalse($exists);
41
    }
42
}