Пример #1
0
 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]);
 }
Пример #2
0
 function it_should_be_invalid_element(NodeInterface $node)
 {
     $node->hasAttribute('data-invalid')->shouldBeCalled()->willReturn(true);
     $this->shouldNotBeValid();
 }
Пример #3
0
 /**
  * Check if element is valid.
  *
  * @return boolean
  */
 public function isValid()
 {
     return false === $this->node->hasAttribute('data-invalid');
 }
Пример #4
0
 function it_should_not_be_checked_element(NodeInterface $node)
 {
     $node->hasAttribute('checked')->willReturn(false);
     $this->shouldNotBeChecked();
 }