silverstripe-framework/tests/php/ORM/DBLocaleTest.php
2016-11-23 19:25:12 +13:00

29 lines
591 B
PHP

<?php
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\Dev\SapphireTest;
/**
* @package framework
* @subpackage tests
*/
class DBLocaleTest extends SapphireTest {
public function testNice() {
$l = DBField::create_field('Locale', 'de_DE');
$this->assertEquals($l->Nice(), 'German');
}
public function testNiceNative() {
$l = DBField::create_field('Locale', 'de_DE');
$this->assertEquals($l->Nice(true), 'Deutsch');
}
public function testNativeName() {
$l = DBField::create_field('Locale', 'de_DE');
$this->assertEquals($l->getNativeName(), 'Deutsch');
}
}