untick() public method

Ticks a checkbox.
public untick ( )
Ejemplo n.º 1
0
 public function testUntick()
 {
     $node = $this->createSelectNode(array('foo' => false, 'bar' => false));
     $field = new ChoiceFormField($node);
     try {
         $field->untick();
         $this->fail('->untick() throws a \\LogicException for select boxes');
     } catch (\LogicException $e) {
         $this->assertTrue(true, '->untick() throws a \\LogicException for select boxes');
     }
     $node = $this->createNode('input', '', array('type' => 'checkbox', 'name' => 'name', 'checked' => 'checked'));
     $field = new ChoiceFormField($node);
     $field->untick();
     $this->assertNull($field->getValue(), '->untick() unticks checkoxes');
 }