| Conditions | 2 |
| Paths | 2 |
| Total Lines | 25 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 151 | public function testInsertButton(string $insertion_point, array $expected): void |
||
| 152 | { |
||
| 153 | foreach (['before', 'after', 'child_of'] as $where) |
||
| 154 | { |
||
| 155 | $haystack = [ |
||
| 156 | 'test' => [ |
||
| 157 | 'href' => 'link', |
||
| 158 | 'show' => true, |
||
| 159 | ], |
||
| 160 | 'test1' => [ |
||
| 161 | 'href' => 'link1', |
||
| 162 | 'show' => true, |
||
| 163 | ], |
||
| 164 | ]; |
||
| 165 | recursive_button( |
||
| 166 | [ |
||
| 167 | 'href' => 'link', |
||
| 168 | 'show' => true, |
||
| 169 | ], |
||
| 170 | $haystack, |
||
| 171 | $insertion_point, |
||
| 172 | $where, |
||
| 173 | 'inserted_' . $insertion_point |
||
| 174 | ); |
||
| 175 | $this->assertSame($expected[$where], $haystack); |
||
| 176 | } |
||
| 421 |