silverstripe-framework/tests/model/DBLocaleTest.php
Andrew O'Neil de2832e65f ENHANCEMENT: Allow Object::create() to be called with late static binding.
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.
2012-03-27 17:57:42 +13:00

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');
}
}