public function testIShouldNotSeeComponentShouldNotThrowExceptionIfComponentFoundAndNotVisible() { $this->setSessionExpectation(true); $cbox = $this->getMock('Behat\\Mink\\Element\\NodeElement', array(), array(), '', false, false); $cbox->expects($this->once())->method('isVisible')->will($this->returnValue(false)); $this->setFindExpectationWithReturnElement('div.main', $cbox); try { $this->context->iShouldNotSeeComponent('Container'); } catch (\RuntimeException $e) { $this->fail("Runtime exception found when expecting no exception."); } }
public function testIShouldNotSeeComponentShouldThrowExceptionOnNonExistentSelector() { $this->setSessionExpectation(false); $this->setExpectedException('\\RuntimeException'); $this->context->iShouldNotSeeComponent('whos dog?'); }