Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function testRemovesDefaultEmptyStringFromClassFilter() |
||
14 | { |
||
15 | $extension = new ElementalCMSMainExtension(); |
||
16 | |||
17 | $field = new DropdownField('Search__FilterClass'); |
||
18 | $field->setEmptyString('All pages'); |
||
19 | $fields = new FieldList($field); |
||
20 | $form = new Form(null, null, $fields, new FieldList()); |
||
21 | |||
22 | $extension->updateSearchForm($form); |
||
23 | |||
24 | $this->assertEmpty($field->getEmptyString(), 'Empty string should be empty'); |
||
25 | $this->assertFalse($field->getHasEmptyDefault(), 'Empty string should not have an empty default'); |
||
26 | } |
||
28 |