2009-04-30 09:37:09 +02:00
|
|
|
<?php
|
2015-08-30 07:02:55 +02:00
|
|
|
|
2016-10-14 03:30:05 +02:00
|
|
|
namespace SilverStripe\ORM\Tests;
|
2016-06-15 06:03:16 +02:00
|
|
|
|
|
|
|
use SilverStripe\ORM\FieldType\DBField;
|
2016-08-19 00:51:35 +02:00
|
|
|
use SilverStripe\Dev\SapphireTest;
|
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
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
|
|
|
|
2016-12-16 05:34:21 +01: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
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
public function testNativeName()
|
|
|
|
{
|
|
|
|
$l = DBField::create_field('Locale', 'de_DE');
|
|
|
|
$this->assertEquals($l->getNativeName(), 'Deutsch');
|
|
|
|
}
|
2009-04-30 09:37:09 +02:00
|
|
|
}
|