mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
de2832e65f
This allows DataList::create('SiteTree') as equivalent to Object::create('DataList', 'SiteTree'), without having to have a create() function on DataList. Required for E_STRICT compliance.
22 lines
497 B
PHP
22 lines
497 B
PHP
<?php
|
|
/**
|
|
* @package sapphire
|
|
* @subpackage tests
|
|
*/
|
|
class DBLocaleTest extends SapphireTest {
|
|
function testNice() {
|
|
$l = DBField::create_field('DBLocale', 'de_DE');
|
|
$this->assertEquals($l->Nice(), 'German');
|
|
}
|
|
|
|
function testNiceNative() {
|
|
$l = DBField::create_field('DBLocale', 'de_DE');
|
|
$this->assertEquals($l->Nice(true), 'Deutsch');
|
|
}
|
|
|
|
function testNativeName() {
|
|
$l = DBField::create_field('DBLocale', 'de_DE');
|
|
$this->assertEquals($l->getNativeName(), 'Deutsch');
|
|
}
|
|
}
|