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
|
|
|
} |