Ejemplo n.º 1
0
 /**
  * test $selected attribute
  */
 public function testInputSelected()
 {
     $input = new TextInput('test', 'value');
     $this->assertNull($input->getSelected());
     $input->setSelected('selected');
     $this->assertEquals('selected', $input->getSelected());
     // test overrule post
     $_POST['foo'] = 'one';
     $input = new TextInput('foo');
     $this->assertEquals('one', $input->getSelected());
     $input->setSelected('two', Input::INPUT_OVERRULE_POST);
     $this->assertEquals('two', $input->getSelected());
 }