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

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