mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: Fixed tests to suit GridField and DataList API changes
This commit is contained in:
parent
f288575919
commit
37684837b8
@ -74,7 +74,7 @@ class GridFieldAddExistingAutocompleterTest_Controller extends Controller implem
|
||||
function Form() {
|
||||
$player = DataObject::get('GridFieldTest_Player')->find('Email', 'player1@test.com');
|
||||
$config = GridFieldConfig::create()->addComponents(
|
||||
$relationComponent = new GridFieldAddExistingAutocompleter('Name'),
|
||||
$relationComponent = new GridFieldAddExistingAutocompleter('before', 'Name'),
|
||||
new GridFieldDataColumns()
|
||||
);
|
||||
$field = new GridField('testfield', 'testfield', $player->Teams(), $config);
|
||||
|
@ -206,6 +206,9 @@ class GridFieldDetailFormTest_Controller extends Controller implements TestOnly
|
||||
->First();
|
||||
|
||||
$field = new GridField('testfield', 'testfield', $group->People());
|
||||
$field->getConfig()->addComponent(new GridFieldToolbarHeader());
|
||||
$field->getConfig()->addComponent(new GridFieldAddNewButton('toolbar-header-right'));
|
||||
$field->getConfig()->addComponent(new GridFieldEditButton());
|
||||
$field->getConfig()->addComponent($gridFieldForm = new GridFieldDetailForm($this, 'Form'));
|
||||
$field->getConfig()->addComponent(new GridFieldEditButton());
|
||||
return new Form($this, 'Form', new FieldList($field), new FieldList());
|
||||
@ -218,6 +221,8 @@ class GridFieldDetailFormTest_GroupController extends Controller implements Test
|
||||
function Form() {
|
||||
$field = new GridField('testfield', 'testfield', DataList::create('GridFieldDetailFormTest_PeopleGroup'));
|
||||
$field->getConfig()->addComponent($gridFieldForm = new GridFieldDetailForm($this, 'Form'));
|
||||
$field->getConfig()->addComponent(new GridFieldToolbarHeader());
|
||||
$field->getConfig()->addComponent(new GridFieldAddNewButton('toolbar-header-right'));
|
||||
$field->getConfig()->addComponent(new GridFieldEditButton());
|
||||
return new Form($this, 'Form', new FieldList($field), new FieldList());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user