1 | <?php |
||
10 | class UserDefinedFormExtensionTest extends SapphireTest |
||
11 | { |
||
12 | /** @var bool */ |
||
13 | protected $usesDatabase = true; |
||
14 | |||
15 | public function testCMSFields() |
||
16 | { |
||
17 | $extension = Injector::inst()->get(UserDefinedFormExtension::class); |
||
18 | $form = UserDefinedForm::create(['Title' => 'Test']); |
||
19 | $form->write(); |
||
20 | $extension->setOwner($form); |
||
21 | $fields = $form->getCMSFields(); |
||
22 | |||
23 | $extension->updateCMSFields($fields); |
||
24 | |||
25 | $this->assertNotNull($fields->dataFieldByName('PartialSubmissions')); |
||
26 | $this->assertNotNull($fields->dataFieldByName('ExportPartialSubmissions')); |
||
27 | } |
||
28 | } |
||
29 |