Conditions | 1 |
Paths | 1 |
Total Lines | 38 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
66 | public function testGetAndSetNotification() : void |
||
67 | { |
||
68 | /* setup */ |
||
69 | |||
70 | $module = new Module\Metadata($this->_registry, $this->_request, $this->_language, $this->_config); |
||
71 | $module->init( |
||
72 | [ |
||
73 | 'name' => 'Test Dummy', |
||
74 | 'alias' => 'TestDummy' |
||
75 | ]); |
||
76 | $module->setNotification('success', 'Success'); |
||
77 | $module->setNotification('error', 'Error'); |
||
78 | |||
79 | /* expect and actual */ |
||
80 | |||
81 | $expectArray = |
||
82 | [ |
||
83 | 'success' => |
||
84 | [ |
||
85 | 'Test Dummy' => |
||
86 | [ |
||
87 | 'Success' |
||
88 | ] |
||
89 | ], |
||
90 | 'error' => |
||
91 | [ |
||
92 | 'Test Dummy' => |
||
93 | [ |
||
94 | 'Error' |
||
95 | ] |
||
96 | ] |
||
97 | ]; |
||
98 | $actualArray = $module->getNotificationArray(); |
||
99 | |||
100 | /* compare */ |
||
101 | |||
102 | $this->assertEquals($expectArray, $actualArray); |
||
103 | } |
||
104 | } |
||
105 |