Merge pull request #354 from robert-h-curry/gridfielddatacolumnstest-custom-member-fix

BUGFIX: Removed assumption in GridFieldDataColumnsTest that Member would...
This commit is contained in:
Sean Harvey 2012-04-19 16:41:03 -07:00
commit ee7d2c3086

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));
}