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

WizardTestCase   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A assertConfirmQuestion() 0 8 1
A assertWizardQuestion() 0 7 1
1
<?php
2
3
namespace Maestriam\Samurai\Tests\Unit\Entities\Wizard;
4
5
use Maestriam\Samurai\Tests\TestCase;
6
use stdClass;
7
8
/**
9
 * Testes de funcionalidades de definir/receber informações do vendor do tema
10
 */
11
class WizardTestCase extends TestCase
12
{
13
    protected function assertWizardQuestion($question)
14
    {
15
        $this->assertInstanceOf(stdClass::class, $question);
16
        $this->assertObjectHasAttribute('ask', $question);
17
        $this->assertObjectHasAttribute('default', $question);
18
        $this->assertIsString($question->ask);
19
        $this->assertIsString($question->default);
20
    }
21
    
22
    protected function assertConfirmQuestion($question)
23
    {
24
        $this->assertInstanceOf(stdClass::class, $question);
25
        $this->assertObjectHasAttribute('ask', $question);
26
        $this->assertObjectHasAttribute('default', $question);
27
        $this->assertIsString($question->ask);
28
        $this->assertIsBool($question->default);
29
        $this->assertFalse($question->default);
30
    }
31
}