Esempio n. 1
0
 /**
  * test attribute disabled
  */
 public function testInputDisabled()
 {
     $input = new TextInput('test');
     $this->assertNull($input->renderDisabled(), 'Initially disabled is null');
     $input->setDisabled('invalid');
     $this->assertNull($input->renderDisabled(), 'Giving an invalid option should not change disabled');
     $input->setDisabled('disabled');
     $this->assertEquals(' disabled="disabled"', $input->renderDisabled());
     $input->setDisabled('readonly');
     $this->assertEquals(' readonly="readonly"', $input->renderDisabled());
     $input->removeDisabled();
     $this->assertNull($input->renderDisabled(), 'removeDisabled should remove the attribute value');
 }