silverstripe-framework/tests/php/ORM/DBLocaleTest.php

24 lines
572 B
PHP
Raw Normal View History

<?php
2016-10-14 03:30:05 +02:00
namespace SilverStripe\ORM\Tests;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\Dev\SapphireTest;
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');
}
}