ExistsThemeTest::testNotExistsTheme()   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\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
}