Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add sorting to GridFieldDetailFormTest fixtures

Broke SQLite3 tests in some cases due to random ordering of results.
  • Loading branch information...
commit bc1c7f766ace6c99a9ffb90d083c81b8c54951a0 1 parent 6466993
@chillu chillu authored
Showing with 9 additions and 3 deletions.
  1. +9 −3 tests/forms/gridfield/GridFieldDetailFormTest.php
View
12 tests/forms/gridfield/GridFieldDetailFormTest.php
@@ -63,8 +63,8 @@ public function testViewForm() {
$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
@@ -209,7 +211,9 @@ class GridFieldDetailFormTest_PeopleGroup extends DataObject implements TestOnly
static $has_many = array(
'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
Please sign in to comment.
Something went wrong with that request. Please try again.