public function testWaitForComponentShouldNotThrowExceptionIfElementDisappearsWhenExpectedCecomesInvisible()
 {
     // Expected to disappear
     // present on page but invisible
     $this->setSessionExpectation(true);
     $input = $this->getMock('Behat\\Mink\\Element\\NodeElement', array(), array(), '', false, false);
     $input->expects($this->once())->method('isVisible')->will($this->returnValue(false));
     $this->setFindExpectationWithReturnElement('input[name=picture]', $input);
     $this->context->waitForComponent('User Picture', 'dis');
 }
 public function testWaitForComponentShouldThrowExceptionOnNonExistentSelector()
 {
     $this->setSessionExpectation(false);
     $this->setExpectedException('\\RuntimeException');
     $this->context->waitForComponent('Stuffed Dog');
 }