mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Fixed broken GridFieldPresenterTest assuming IDs
This commit is contained in:
parent
dd48a605b6
commit
f2fba45a77
10
tests/forms/GridFieldPresenterTest.php
Normal file → Executable file
10
tests/forms/GridFieldPresenterTest.php
Normal file → Executable file
@ -47,9 +47,15 @@ class GridFieldPresenterTest extends SapphireTest {
|
||||
$presenter->setGridField($GridField);
|
||||
$presenter->sort('Name','desc');
|
||||
$data = $presenter->Items()->map('ID','Name');
|
||||
$this->assertEquals(array(2=>'Second Person', 1=>'First Person'), $data);
|
||||
$this->assertEquals(array(
|
||||
$this->idFromFixture('GridFieldTest_Person', 'second') => 'Second Person',
|
||||
$this->idFromFixture('GridFieldTest_Person', 'first') => 'First Person'
|
||||
), $data);
|
||||
$presenter->sort('Name','asc');
|
||||
$data = $presenter->Items()->map('ID','Name');
|
||||
$this->assertEquals(array(1=>'First Person', 2=>'Second Person'), $data);
|
||||
$this->assertEquals(array(
|
||||
$this->idFromFixture('GridFieldTest_Person', 'first') => 'First Person',
|
||||
$this->idFromFixture('GridFieldTest_Person', 'second') => 'Second Person'
|
||||
), $data);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user