silverstripe-framework/tests/model/DBLocaleTest.php

27 lines
555 B
PHP
Raw Normal View History

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