DropDownTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 6
rs 10
c 0
b 0
f 0
ccs 4
cts 4
cp 1
crap 1
1
<?php
2
3
namespace Tests;
4
5
use JumpGate\Menu\DropDown;
6
use PHPUnit\Framework\TestCase;
7
8
class DropDownTest extends TestCase
9
{
10
    /**
11
     * @var \JumpGate\Menu\DropDown
12
     */
13
    protected $dropDown;
14
15 5
    public function setUp()
16
    {
17 5
        parent::setUp();
18
19 5
        $this->dropDown = new DropDown();
20 5
    }
21
22
    /** @test */
23 1
    public function it_checks_is_dropdown()
24
    {
25 1
        $this->assertTrue($this->dropDown->isDropDown());
26 1
    }
27
28
    /** @test */
29 1
    public function it_checks_has_links_method()
30
    {
31 1
        $this->dropDown->links[] = 'one';
32
33 1
        $this->assertTrue($this->dropDown->hasLinks());
34 1
    }
35
36
    /** @test */
37 1
    public function it_checks_has_links_method_no_links()
38
    {
39 1
        $this->assertFalse($this->dropDown->hasLinks());
40 1
    }
41
42
    /** @test */
43 1
    public function it_checks_active_parentage()
44
    {
45 1
        $this->assertTrue($this->dropDown->activeParentage());
46 1
    }
47
48
    /** @test */
49 1
    public function it_disables_active_parentage()
50
    {
51 1
        $this->dropDown->disableActiveParentage();
52
53 1
        $this->assertFalse($this->dropDown->activeParentage());
54 1
    }
55
}
56