Completed
Push — master ( 20c412...48d54d )
by Vítězslav
05:37
created

ChangesTest   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 62
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 62
rs 10
wmc 6
lcom 1
cbo 2

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testEnable() 0 5 1
A testGetFlexiData() 0 6 1
A testDisable() 0 5 1
A testGetStatus() 0 5 1
A tearDown() 0 4 1
1
<?php
2
3
namespace Test\FlexiPeeHP;
4
5
use FlexiPeeHP\Changes;
6
7
/**
8
 * Generated by PHPUnit_SkeletonGenerator on 2016-05-24 at 14:37:24.
9
 */
10
class ChangesTest extends FlexiBeeTest
11
{
12
    /**
13
     * @var Changes
14
     */
15
    protected $object;
16
17
    /**
18
     * Sets up the fixture, for example, opens a network connection.
19
     * This method is called before a test is executed.
20
     */
21
    protected function setUp()
22
    {
23
        $this->object = new Changes;
24
    }
25
26
    /**
27
     * @covers FlexiPeeHP\Changes::enable
28
     */
29
    public function testEnable()
30
    {
31
        $this->object->enable();
32
        $this->assertTrue($this->object->getStatus());
33
    }
34
35
    /**
36
     * @covers FlexiPeeHP\Changes::getFlexiData
37
     */
38
    public function testGetFlexiData()
39
    {
40
        $flexidata = $this->object->getFlexiData();
41
        $this->assertArrayHasKey(0, $flexidata);
42
        $this->assertArrayHasKey('id', $flexidata[0]);
43
    }
44
45
    /**
46
     * @covers FlexiPeeHP\Changes::disable
47
     */
48
    public function testDisable()
49
    {
50
        $this->object->disable();
51
        $this->assertFalse($this->object->getStatus());
52
    }
53
54
    /**
55
     * @covers FlexiPeeHP\Changes::getChangesStatus
56
     */
57
    public function testGetStatus()
58
    {
59
        $status = $this->object->getStatus();
60
        $this->assertInternalType('boolean', $status);
61
    }
62
63
    /**
64
     * Tears down the fixture, for example, closes a network connection.
65
     * This method is called after a test is executed.
66
     */
67
    protected function tearDown()
68
    {
69
70
    }
71
}