| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 14 | public function testCreateButtonFromSetting(): void |
||
| 15 | { |
||
| 16 | // setup |
||
| 17 | $_GET['create-page-endpoint'] = '/create-endpoint/'; |
||
| 18 | $_GET['create-button'] = 1; |
||
| 19 | $listBuilder = new ListBuilder\Common($this->getFields(), new FakeAdapter($this->getRecords())); |
||
| 20 | $listBuilder->createButtonEndpoint = '/create-endpoint-from-setting/'; |
||
| 21 | $listBuilder->listTitle = 'Some list title'; |
||
| 22 | |||
| 23 | // test body |
||
| 24 | $content = $listBuilder->listingForm(); |
||
| 25 | |||
| 26 | // assertions |
||
| 27 | $this->assertStringContainsString("/create-endpoint-from-setting/", $content); |
||
| 28 | } |
||
| 30 |