Fixed test failures related to legacy code in the test objects

This commit is contained in:
UndefinedOffset 2018-03-01 10:52:12 -04:00
parent 20da27f7dd
commit 6cfc1b7338
3 changed files with 25 additions and 19 deletions

View File

@ -15,6 +15,8 @@ use SilverStripe\Forms\GridField\GridFieldConfig;
use SilverStripe\ORM\DataList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DB;
use SilverStripe\ORM\FieldType\DBInt;
use SilverStripe\ORM\FieldType\DBVarchar;
use SilverStripe\Security\Member;
use SilverStripe\Versioned\Versioned;
use UndefinedOffset\SortableGridField\Forms\GridFieldSortableRows;
@ -280,8 +282,8 @@ class GridFieldAction_SortOrder_Player extends DataObject implements TestOnly
private static $table_name = 'GridFieldAction_SortOrder_Player';
private static $db = array(
'Name' => 'Varchar',
'SortOrder' => 'Int'
'Name' => DBVarchar::class,
'SortOrder' => DBInt::class
);
private static $default_sort = 'SortOrder';
@ -299,8 +301,8 @@ class GridFieldAction_SortOrder_VPlayer extends DataObject implements TestOnly
private static $table_name = 'GridFieldAction_SortOrder_VPlayer';
private static $db = array(
'Name' => 'Varchar',
'SortOrder' => 'Int'
'Name' => DBVarchar:class,
'SortOrder' => DBInt::class
);
private static $default_sort = 'SortOrder';
@ -322,7 +324,7 @@ class GridFieldAction_SortOrder_TestParent extends DataObject implements TestOnl
private static $table_name = 'GridFieldAction_SortOrder_TestParent';
private static $db = array(
'Name' => 'Varchar'
'Name' => DBVarchar::class
);
private static $has_many = array(
@ -341,7 +343,7 @@ class GridFieldAction_SortOrder_BaseObject extends DataObject implements TestOnl
private static $table_name = 'GridFieldAction_SortOrder_BaseObject';
private static $db = array(
'Name' => 'Varchar'
'Name' => DBVarchar::class
);
}
@ -357,7 +359,7 @@ class GridFieldAction_SortOrder_ChildObject extends GridFieldAction_SortOrder_Ba
private static $table_name = 'GridFieldAction_SortOrder_ChildObject';
private static $db = array(
'SortOrder' => 'Int'
'SortOrder' => DBInt::class
);
private static $has_one = array(

View File

@ -14,6 +14,8 @@ use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridFieldConfig_Base;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBInt;
use SilverStripe\ORM\FieldType\DBVarchar;
use SilverStripe\Versioned\Versioned;
use UndefinedOffset\SortableGridField\Forms\GridFieldSortableRows;
@ -204,9 +206,9 @@ class GridFieldAction_PageSortOrder_Team extends DataObject implements TestOnly
private static $table_name = 'GridFieldAction_PageSortOrder_Team';
private static $db = array(
'Name' => 'Varchar',
'City' => 'Varchar',
'SortOrder' => 'Int'
'Name' => DBVarchar::class,
'City' => DBVarchar::class,
'SortOrder' => DBInt::class
);
private static $default_sort = 'SortOrder';
@ -225,9 +227,9 @@ class GridFieldAction_PageSortOrder_VTeam extends DataObject implements TestOnly
private static $table_name = 'GridFieldAction_PageSortOrder_VTeam';
private static $db = array(
'Name' => 'Varchar',
'City' => 'Varchar',
'SortOrder' => 'Int'
'Name' => DBVarchar::class,
'City' => DBVarchar::class,
'SortOrder' => DBInt::class
);
private static $default_sort = 'SortOrder';

View File

@ -14,6 +14,8 @@ use SilverStripe\Forms\GridField\GridFieldConfig;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\ValidationException;
use SilverStripe\ORM\FieldType\DBInt;
use SilverStripe\ORM\FieldType\DBVarchar;
use SilverStripe\Security\Member;
use SilverStripe\Versioned\Versioned;
use UndefinedOffset\SortableGridField\Forms\GridFieldSortableRows;
@ -133,9 +135,9 @@ class GridFieldAction_SortOrder_Team extends DataObject implements TestOnly
private static $table_name = 'GridFieldAction_SortOrder_Team';
private static $db = array(
'Name' => 'Varchar',
'City' => 'Varchar',
'SortOrder' => 'Int'
'Name' => DBVarchar:class,
'City' => DBVarchar:class,
'SortOrder' => DBInt:class
);
private static $default_sort = 'SortOrder';
@ -154,9 +156,9 @@ class GridFieldAction_SortOrder_VTeam extends DataObject implements TestOnly
private static $table_name = 'GridFieldAction_SortOrder_VTeam';
private static $db = array(
'Name' => 'Varchar',
'City' => 'Varchar',
'SortOrder' => 'Int'
'Name' => DBVarchar:class,
'City' => DBVarchar:class,
'SortOrder' => DBInt::class
);
private static $default_sort = 'SortOrder';