Merge pull request #44 from open-sausages/pulls/4.0/i-name-thou-annoying

BUG Fix table_name config for test pages
This commit is contained in:
Robbie Averill 2017-11-27 21:06:12 +13:00 committed by GitHub
commit bcc123b905
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 2 deletions

View File

@ -36,6 +36,8 @@ use SilverStripe\Forms\HTMLReadonlyField;
class BasicFieldsTestPage extends TestPage class BasicFieldsTestPage extends TestPage
{ {
private static $table_name = 'BasicFieldsTestPage';
private static $db = array( private static $db = array(
'CalendarDate' => 'Date', 'CalendarDate' => 'Date',
'Checkbox' => 'Boolean', 'Checkbox' => 'Boolean',

View File

@ -11,6 +11,7 @@ use SilverStripe\Forms\Form;
class GridFieldTestPage extends TestPage class GridFieldTestPage extends TestPage
{ {
private static $table_name = 'GridFieldTestPage';
private static $has_one = array( private static $has_one = array(
"HasOneCompany" => "SilverStripe\\FrameworkTest\\Model\\Company", "HasOneCompany" => "SilverStripe\\FrameworkTest\\Model\\Company",

View File

@ -10,6 +10,7 @@ use SilverStripe\Forms\TreeMultiselectField;
class RelationFieldsTestPage extends TestPage class RelationFieldsTestPage extends TestPage
{ {
private static $table_name = 'RelationFieldsTestPage';
private static $has_one = array( private static $has_one = array(
"HasOneCompany" => "SilverStripe\\FrameworkTest\\Model\\Company", "HasOneCompany" => "SilverStripe\\FrameworkTest\\Model\\Company",
@ -28,13 +29,13 @@ class RelationFieldsTestPage extends TestPage
private static $defaults = array( private static $defaults = array(
'Title' => 'Relational Fields' 'Title' => 'Relational Fields'
); );
public function getCMSFields() public function getCMSFields()
{ {
$fields = parent::getCMSFields(); $fields = parent::getCMSFields();
$allFields = array(); $allFields = array();
$checkboxFields = array( $checkboxFields = array(
new CheckboxSetField("CheckboxSet", "CheckboxSetField", TestCategory::map()) new CheckboxSetField("CheckboxSet", "CheckboxSetField", TestCategory::map())
); );

View File

@ -13,6 +13,7 @@ use SilverStripe\Forms\Form;
class TestFileUploadPage extends TestPage class TestFileUploadPage extends TestPage
{ {
private static $table_name = 'TestFileUploadPage';
} }
class TestFileUploadPage_Controller extends TestPage_Controller class TestFileUploadPage_Controller extends TestPage_Controller

View File

@ -19,6 +19,7 @@ use SilverStripe\Security\Security;
*/ */
class TestPage extends Page class TestPage extends Page
{ {
private static $table_name = 'TestPage';
/** /**
* We can only create subclasses of TestPage * We can only create subclasses of TestPage