mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Removed assumption in GridFieldDataColumnsTest that Member would always have the same summary fields.
This commit is contained in:
parent
6350f306f5
commit
ee53df336d
@ -6,11 +6,7 @@ class GridFieldDataColumnsTest extends SapphireTest {
|
|||||||
*/
|
*/
|
||||||
public function testGridFieldGetDefaultDisplayFields() {
|
public function testGridFieldGetDefaultDisplayFields() {
|
||||||
$obj = new GridField('testfield', 'testfield', DataList::create('Member'));
|
$obj = new GridField('testfield', 'testfield', DataList::create('Member'));
|
||||||
$expected = array(
|
$expected = singleton('Member')->summaryFields();
|
||||||
'FirstName' => 'First Name',
|
|
||||||
'Surname' => 'Last Name',
|
|
||||||
'Email' => 'Email',
|
|
||||||
);
|
|
||||||
$columns = $obj->getConfig()->getComponentByType('GridFieldDataColumns');
|
$columns = $obj->getConfig()->getComponentByType('GridFieldDataColumns');
|
||||||
$this->assertEquals($expected, $columns->getDisplayFields($obj));
|
$this->assertEquals($expected, $columns->getDisplayFields($obj));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user