2012-01-31 11:44:16 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @package sapphire
|
|
|
|
* @subpackage tests
|
|
|
|
*/
|
|
|
|
|
|
|
|
class StringFieldTest extends SapphireTest {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @covers StringField->LowerCase()
|
|
|
|
*/
|
|
|
|
function testLowerCase() {
|
|
|
|
$this->assertEquals(
|
|
|
|
'this is a test!',
|
2012-03-27 06:57:42 +02:00
|
|
|
DBField::create_field('StringFieldTest_MyStringField', 'This is a TEST!')->LowerCase()
|
2012-01-31 11:44:16 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @covers StringField->UpperCase()
|
|
|
|
*/
|
|
|
|
function testUpperCase() {
|
|
|
|
$this->assertEquals(
|
|
|
|
'THIS IS A TEST!',
|
2012-03-27 06:57:42 +02:00
|
|
|
DBField::create_field('StringFieldTest_MyStringField', 'This is a TEST!')->UpperCase()
|
2012-01-31 11:44:16 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class StringFieldTest_MyStringField extends StringField implements TestOnly {
|
|
|
|
function requireField() {}
|
|
|
|
}
|