mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Add sorting to GridFieldDetailFormTest fixtures
Broke SQLite3 tests in some cases due to random ordering of results.
This commit is contained in:
parent
64669938da
commit
bc1c7f766a
@ -63,8 +63,8 @@ class GridFieldDetailFormTest extends FunctionalTest {
|
||||
$surname = $parser->getBySelector('#Form_ItemEditForm_Surname');
|
||||
|
||||
$this->assertFalse($response->isError());
|
||||
$this->assertEquals('Joe', (string) $firstName[0]);
|
||||
$this->assertEquals('Bloggs', (string) $surname[0]);
|
||||
$this->assertEquals('Jane', (string) $firstName[0]);
|
||||
$this->assertEquals('Doe', (string) $surname[0]);
|
||||
}
|
||||
|
||||
function testEditForm() {
|
||||
@ -188,6 +188,8 @@ class GridFieldDetailFormTest_Person extends DataObject implements TestOnly {
|
||||
'Categories' => 'GridFieldDetailFormTest_Category'
|
||||
);
|
||||
|
||||
static $default_sort = 'FirstName';
|
||||
|
||||
function getCMSFields() {
|
||||
$fields = parent::getCMSFields();
|
||||
// TODO No longer necessary once FormScaffolder uses GridField
|
||||
@ -210,6 +212,8 @@ class GridFieldDetailFormTest_PeopleGroup extends DataObject implements TestOnly
|
||||
'People' => 'GridFieldDetailFormTest_Person'
|
||||
);
|
||||
|
||||
static $default_sort = 'Name';
|
||||
|
||||
function getCMSFields() {
|
||||
$fields = parent::getCMSFields();
|
||||
// TODO No longer necessary once FormScaffolder uses GridField
|
||||
@ -232,6 +236,8 @@ class GridFieldDetailFormTest_Category extends DataObject implements TestOnly {
|
||||
'People' => 'GridFieldDetailFormTest_Person'
|
||||
);
|
||||
|
||||
static $default_sort = 'Name';
|
||||
|
||||
function getCMSFields() {
|
||||
$fields = parent::getCMSFields();
|
||||
// TODO No longer necessary once FormScaffolder uses GridField
|
||||
|
Loading…
x
Reference in New Issue
Block a user