Failed Conditions
Branch feature/refactoring-samurai (8cc7c1)
by Giuliano
03:47
created

InitThemeTest::testInitTheme()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 21
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 11
nc 2
nop 0
dl 0
loc 21
rs 9.9
c 0
b 0
f 0
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
}