mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
34 lines
654 B
PHP
34 lines
654 B
PHP
<?php
|
|
/**
|
|
* @package framework
|
|
* @subpackage tests
|
|
*/
|
|
|
|
class StringFieldTest extends SapphireTest {
|
|
|
|
/**
|
|
* @covers StringField->LowerCase()
|
|
*/
|
|
function testLowerCase() {
|
|
$this->assertEquals(
|
|
'this is a test!',
|
|
DBField::create_field('StringFieldTest_MyStringField', 'This is a TEST!')->LowerCase()
|
|
);
|
|
}
|
|
|
|
/**
|
|
* @covers StringField->UpperCase()
|
|
*/
|
|
function testUpperCase() {
|
|
$this->assertEquals(
|
|
'THIS IS A TEST!',
|
|
DBField::create_field('StringFieldTest_MyStringField', 'This is a TEST!')->UpperCase()
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
class StringFieldTest_MyStringField extends StringField implements TestOnly {
|
|
function requireField() {}
|
|
}
|