function it_throws_exception_when_try_to_set_multiple_values_on_single_select_element(NodeInterface $nodeInterface) { $value = [2, 3]; $nodeInterface->hasAttribute('multi')->willReturn(false); $this->shouldThrow('\\InvalidArgumentException')->during('setValue', [$value]); }
function it_should_be_invalid_element(NodeInterface $node) { $node->hasAttribute('data-invalid')->shouldBeCalled()->willReturn(true); $this->shouldNotBeValid(); }
/** * Check if element is valid. * * @return boolean */ public function isValid() { return false === $this->node->hasAttribute('data-invalid'); }
function it_should_not_be_checked_element(NodeInterface $node) { $node->hasAttribute('checked')->willReturn(false); $this->shouldNotBeChecked(); }