| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 31 | public function testCreateButtonFromSetting(): void |
||
| 32 | { |
||
| 33 | // setup |
||
| 34 | $_GET['create-page-endpoint'] = '/create-endpoint/'; |
||
| 35 | $_GET['create-button'] = 1; |
||
| 36 | $listBuilder = new ListBuilder\Common($this->getFields(), new FakeAdapter($this->getRecords())); |
||
| 37 | $listBuilder->createButtonEndpoint = '/create-endpoint-from-setting/'; |
||
| 38 | $listBuilder->listTitle = 'Some list title'; |
||
| 39 | |||
| 40 | // test body |
||
| 41 | $content = $listBuilder->listingForm(); |
||
| 42 | |||
| 43 | // assertions |
||
| 44 | $this->assertStringContainsString("/create-endpoint-from-setting/", $content); |
||
| 45 | } |
||
| 47 |