1 | <?php |
||
11 | class HooksTest extends FlexiBeeRWTest |
||
12 | { |
||
13 | /** |
||
14 | * @var Hooks |
||
15 | */ |
||
16 | protected $object; |
||
17 | |||
18 | /** |
||
19 | * Changes API enabler/disabler |
||
20 | * @var Changes |
||
21 | */ |
||
22 | protected $changes; |
||
23 | |||
24 | /** |
||
25 | * Onetime Hook for tests |
||
26 | * @var string |
||
27 | */ |
||
28 | public $testHookName = null; |
||
29 | |||
30 | public function __construct($name = null, array $data = array(), |
||
36 | |||
37 | /** |
||
38 | * Sets up the fixture, for example, opens a network connection. |
||
39 | * This method is called before a test is executed. |
||
40 | */ |
||
41 | protected function setUp() |
||
45 | |||
46 | /** |
||
47 | * @covers FlexiPeeHP\Hooks::register |
||
48 | */ |
||
49 | public function testRegister() |
||
59 | |||
60 | /** |
||
61 | * @covers FlexiPeeHP\Hooks::getFlexiData |
||
62 | * @depends testRegister |
||
63 | */ |
||
64 | public function testGetFlexiData() |
||
70 | |||
71 | /** |
||
72 | * @covers FlexiPeeHP\Hooks::recordExists |
||
73 | * @depends testRegister |
||
74 | */ |
||
75 | public function testRecordExists() |
||
79 | |||
80 | /** |
||
81 | * @covers FlexiPeeHP\Hooks::refreshWebHook |
||
82 | * @depends testRegister |
||
83 | */ |
||
84 | public function testRefreshWebHook() |
||
85 | { |
||
86 | $hooks = $this->object->getAllFromFlexibee(); |
||
87 | $this->assertTrue($this->object->refreshWebHook(current(end($hooks)))); |
||
88 | } |
||
89 | |||
90 | /** |
||
91 | * @covers FlexiPeeHP\Hooks::unregister |
||
92 | * @depends testRegister |
||
93 | */ |
||
94 | public function testUnregister() |
||
99 | |||
100 | /** |
||
101 | * Disable ChangesAPI |
||
102 | */ |
||
103 | protected function tearDown() |
||
107 | } |
||
108 |