Ejemplo n.º 1
0
 public function testIsValueEmpty()
 {
     $field = new OptionsField('field1', 'field1', array(1 => 'apple', 2 => 'pear'));
     $this->assertEquals($field->isValueEmpty(), true, 'Null value');
     $field->setValue(array());
     $this->assertEquals($field->isValueEmpty(), true, 'Empty array');
     $field->setValue(array(1));
     $this->assertEquals($field->isValueEmpty(), false, 'Non-empty array');
 }