/** * Mark element as invalid. * * @param string $message * @return void */ public function setInvalid($message) { $this->node->setAttribute('data-invalid', $message); }
function it_should_mark_as_checked_element(NodeInterface $node) { $node->setAttribute('checked', 'checked')->shouldBeCalled(); $this->setChecked()->shouldBe($this); }
function it_should_set_element_as_invalid(NodeInterface $node) { $node->setAttribute('data-invalid', 'foo')->shouldBeCalled(); $this->setInvalid('foo'); }
function it_should_mark_as_checked_element(NodeInterface $node) { $node->setAttribute('checked', 'checked')->shouldBeCalled(); $this->setChecked()->shouldHaveType('DeForm\\Element\\CheckboxElement'); }