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

InitThemeTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testInitTheme() 0 21 2
1
<?php
2
3
namespace Maestriam\Samurai\Tests\Feature\Facade;
4
5
use Maestriam\Samurai\Support\Samurai;
6
use Maestriam\Samurai\Tests\Unit\Entities\Wizard\WizardTestCase;
7
8
class InitThemeTest extends WizardTestCase
9
{
10
    public function testInitTheme()
11
    {
12
        $name = 'bands/stage-dolls';
13
14
        $this->theme($name)->findOrCreate();
15
16
        $theme  = Samurai::wizard()->theme();
0 ignored issues
show
Bug introduced by
The method wizard() does not exist on Maestriam\Samurai\Support\Samurai. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

16
        $theme  = Samurai::/** @scrutinizer ignore-call */ wizard()->theme();
Loading history...
17
        $author = Samurai::wizard()->author();
18
        $descr  = Samurai::wizard()->description();
19
20
        $questions = [$author, $theme, $descr];
21
22
        foreach ($questions as $question) {
23
            $this->assertWizardQuestion($question);
24
        }
25
26
        $confirm = Samurai::wizard()->confirm(
27
            $theme->default, $author->default, $descr->default
28
        );
29
30
        $this->assertConfirmQuestion($confirm);
31
    }
32
}