class Element_Set extends Element_Base {
public function test_serialize_selected_default() {
$element = patForms::createElement ('set', 'set', array(
'values' => array(
array(
'label' => 'More patForms elements',
'value' => 'w1',
),
),
));
$element->setValue(array(0 => 'w1'));
$expected = '';
$result = self::stripElementId($element->serialize());
$this->assertTrue($result === $expected);
}
public function test_serialize_selected_numeric_value() {
$element = patForms::createElement ('set', 'set', array(
'values' => array(
array(
'label' => 'More patForms elements',
'value' => 'w1',
),
),
));
$element->setValue('w1');
$expected = '';
$result = self::stripElementId($element->serialize());
$this->assertTrue($result === $expected);
}
}
?>