mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Add unit test for FieldList::getContainerField()
This commit is contained in:
parent
51ba787ffb
commit
a13a2cdd40
@ -1176,4 +1176,18 @@ class FieldListTest extends SapphireTest
|
||||
// put all your HiddenFields at the top level.
|
||||
$this->assertNotNull($visible->dataFieldByName('D2'));
|
||||
}
|
||||
|
||||
public function testContainerField()
|
||||
{
|
||||
$fieldlist = new FieldList();
|
||||
$container = CompositeField::create();
|
||||
|
||||
$this->assertNull($fieldlist->getContainerField());
|
||||
|
||||
$fieldlist->setContainerField($container);
|
||||
$this->assertEquals($container, $fieldlist->getContainerField());
|
||||
|
||||
$fieldlist->setContainerField(null);
|
||||
$this->assertNull($fieldlist->getContainerField());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user