silverstripe-framework/tests/model/DBLocaleTest.php
Damian Mooyman 8dd644d25d
API Namespace all classes
Namespace all templates
Move difflib and BBCodeParser2 to thirdparty
Remove deprecated API marked for removal in 4.0
2016-09-08 10:23:17 +12: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');
}
}