mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
19 lines
508 B
PHP
19 lines
508 B
PHP
|
<?php
|
||
|
/**
|
||
|
* @package framework
|
||
|
* @subpackage tests
|
||
|
*/
|
||
|
class EnumFieldTest extends SapphireTest {
|
||
|
public function testAnyFieldIsPresentInSearchField() {
|
||
|
$values = array (
|
||
|
'Key' => 'Value'
|
||
|
);
|
||
|
$enumField = new Enum('testField', $values);
|
||
|
|
||
|
$searchField = $enumField->scaffoldSearchField();
|
||
|
|
||
|
$anyText = "(" . _t('Enum.ANY', 'Any') . ")";
|
||
|
$this->assertEquals(true, $searchField->getHasEmptyDefault());
|
||
|
$this->assertEquals($anyText, $searchField->getEmptyString());
|
||
|
}
|
||
|
}
|