MNT Explicitly set class for test polymorphic has_one

This commit is contained in:
Guy Sartorelli 2022-05-31 15:07:04 +12:00
parent 1144d1d0ad
commit 12ccb9636c

View File

@ -34,7 +34,11 @@ class GridFieldAddClassesButtonTest extends SapphireTest
$controller->setCurrentPageID($udf->ID);
$controller->pushCurrent();
$list = new DataList(EditableFormField::class);
$field = EditableTextField::create(['ParentID' => $udfID, 'Title' => 'MyTitle']);
$field = EditableTextField::create([
'ParentClass' => UserDefinedForm::class,
'ParentID' => $udfID,
'Title' => 'MyTitle',
]);
$fieldID = $field->write();
$list->add($field);
$gridField = new GridField('MyName', 'MyTitle', $list);