| Conditions | 1 |
| Paths | 1 |
| Total Lines | 25 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 16 | public function actionsDataProvider(): array |
||
| 17 | { |
||
| 18 | return [ |
||
| 19 | // #0, the first case - empty listing |
||
| 20 | [ |
||
| 21 | function (): object { |
||
| 22 | // setup |
||
| 23 | unset($_GET['create-button']); |
||
| 24 | return new ListBuilder\Common($this->getFields(), new FakeAdapter([])); |
||
| 25 | }, |
||
| 26 | function ($result): void { |
||
| 27 | // asserting method |
||
| 28 | $this->assertStringNotContainsString('create-button"', $result); |
||
| 29 | } |
||
| 30 | ], |
||
| 31 | // #1, the second case - full header |
||
| 32 | [ |
||
| 33 | function (): object { |
||
| 34 | // setup |
||
| 35 | $_GET['create-button'] = 1; |
||
| 36 | return new ListBuilder\Common($this->getFields(), new FakeAdapter([])); |
||
| 37 | }, |
||
| 38 | function ($result): void { |
||
| 39 | // asserting method |
||
| 40 | $this->assertStringContainsString('../create/', $result); |
||
| 41 | } |
||
| 63 |