mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
2625cea5e3
Validates that https://github.com/silverstripe/silverstripe-framework/issues/3473 has been fixed The bug was fixed in #8448
48 lines
1.1 KiB
PHP
48 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace SilverStripe\ORM\Tests\DataObjectTest;
|
|
|
|
use SilverStripe\Dev\TestOnly;
|
|
use SilverStripe\ORM\DataObject;
|
|
|
|
class Fixture extends DataObject implements TestOnly
|
|
{
|
|
private static $table_name = 'DataObjectTest_Fixture';
|
|
|
|
private static $db = array(
|
|
// Funny field names
|
|
'Data' => 'Varchar',
|
|
'Duplicate' => 'Varchar',
|
|
'DbObject' => 'Varchar',
|
|
|
|
// Field types
|
|
'DateField' => 'Date',
|
|
'DatetimeField' => 'Datetime',
|
|
|
|
'MyFieldWithDefault' => 'Varchar',
|
|
'MyFieldWithAltDefault' => 'Varchar',
|
|
|
|
'MyInt' => 'Int',
|
|
'MyCurrency' => 'Currency',
|
|
'MyDecimal'=> 'Decimal',
|
|
);
|
|
|
|
private static $defaults = array(
|
|
'MyFieldWithDefault' => 'Default Value',
|
|
);
|
|
|
|
private static $summary_fields = array(
|
|
'Data' => 'Data',
|
|
'DateField.Nice' => 'Date'
|
|
);
|
|
|
|
private static $searchable_fields = array();
|
|
|
|
public function populateDefaults()
|
|
{
|
|
parent::populateDefaults();
|
|
|
|
$this->MyFieldWithAltDefault = 'Default Value';
|
|
}
|
|
}
|