BUGFIX: Removed assumption in GridFieldDataColumnsTest that Member would always have the same summary fields.

This commit is contained in:
Robert Curry 2012-04-20 11:38:06 +12:00
parent 6350f306f5
commit ee53df336d

View File

@ -6,11 +6,7 @@ class GridFieldDataColumnsTest extends SapphireTest {
*/
public function testGridFieldGetDefaultDisplayFields() {
$obj = new GridField('testfield', 'testfield', DataList::create('Member'));
$expected = array(
'FirstName' => 'First Name',
'Surname' => 'Last Name',
'Email' => 'Email',
);
$expected = singleton('Member')->summaryFields();
$columns = $obj->getConfig()->getComponentByType('GridFieldDataColumns');
$this->assertEquals($expected, $columns->getDisplayFields($obj));
}