mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
Test tidy up
This commit is contained in:
parent
ef51d59b49
commit
52abae49ca
@ -41,7 +41,7 @@ class GridFieldAddNewMultiClassTest extends SapphireTest {
|
||||
* @ignore
|
||||
*/
|
||||
|
||||
class GridFieldAddNewMultiClassTest_A {
|
||||
class GridFieldAddNewMultiClassTest_A implements TestOnly {
|
||||
public function i18n_singular_name() {
|
||||
$class = get_class($this);
|
||||
return substr($class, strpos($class, '_') + 1);
|
||||
@ -52,7 +52,7 @@ class GridFieldAddNewMultiClassTest_A {
|
||||
}
|
||||
}
|
||||
|
||||
class GridFieldAddNewMultiClassTest_B extends GridFieldAddNewMultiClassTest_A {}
|
||||
class GridFieldAddNewMultiClassTest_C extends GridFieldAddNewMultiClassTest_A {}
|
||||
class GridFieldAddNewMultiClassTest_B extends GridFieldAddNewMultiClassTest_A implements TestOnly {}
|
||||
class GridFieldAddNewMultiClassTest_C extends GridFieldAddNewMultiClassTest_A implements TestOnly {}
|
||||
|
||||
/**#@-*/
|
||||
|
@ -6,6 +6,12 @@ class GridFieldOrderableRowsTest extends SapphireTest {
|
||||
|
||||
protected $usesDatabase = true;
|
||||
|
||||
protected $extraDataObjects = array(
|
||||
'GridFieldOrderableRowsTest_Parent',
|
||||
'GridFieldOrderableRowsTest_Ordered',
|
||||
'GridFieldOrderableRowsTest_Subclass',
|
||||
);
|
||||
|
||||
/**
|
||||
* @covers GridFieldOrderableRows::getSortTable
|
||||
*/
|
||||
@ -42,7 +48,7 @@ class GridFieldOrderableRowsTest extends SapphireTest {
|
||||
* @ignore
|
||||
*/
|
||||
|
||||
class GridFieldOrderableRowsTest_Parent extends DataObject {
|
||||
class GridFieldOrderableRowsTest_Parent extends DataObject implements TestOnly {
|
||||
|
||||
private static $has_many = array(
|
||||
'MyHasMany' => 'GridFieldOrderableRowsTest_Ordered',
|
||||
@ -59,7 +65,7 @@ class GridFieldOrderableRowsTest_Parent extends DataObject {
|
||||
|
||||
}
|
||||
|
||||
class GridFieldOrderableRowsTest_Ordered extends DataObject {
|
||||
class GridFieldOrderableRowsTest_Ordered extends DataObject implements TestOnly {
|
||||
|
||||
private static $db = array(
|
||||
'Sort' => 'Int'
|
||||
@ -69,9 +75,13 @@ class GridFieldOrderableRowsTest_Ordered extends DataObject {
|
||||
'Parent' => 'GridFieldOrderableRowsTest_Parent'
|
||||
);
|
||||
|
||||
private static $belongs_many_many =array(
|
||||
'MyManyMany' => 'GridFieldOrderableRowsTest_Parent',
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
class GridFieldOrderableRowsTest_Subclass extends GridFieldOrderableRowsTest_Ordered {
|
||||
class GridFieldOrderableRowsTest_Subclass extends GridFieldOrderableRowsTest_Ordered implements TestOnly {
|
||||
}
|
||||
|
||||
/**#@-*/
|
||||
|
Loading…
Reference in New Issue
Block a user