public function from($dropdown_list_locator) { Expectations::shouldNotBeNull($this->__getLastVisitedLocation(), "Nowhere to pick from... Please specify where to find the selection."); $this->__getSelenium()->select($dropdown_list_locator, 'label=' . $this->__getLastVisitedLocation()); $this->__resetLastVisitedLocation(); }
public function unchecked() { Expectations::shouldNotBeNull($this->__getLastVisitedLocation(), "No element was specified. Did you forget the call to shouldSee ?"); Expectations::shouldBeFalse($this->__getSelenium()->isChecked($this->__getLastVisitedLocation())); $this->__resetLastVisitedLocation(); }
/** * @test */ public function ShouldNotBeNullShouldBehaveLikeAssertNotNull() { self::assertNotNull("Something not null"); Expectations::shouldNotBeNull("Something not null"); try { self::assertNotNull(null); throw new Exception("assertNotNull should fail if something null"); } catch (PHPUnit_Framework_ExpectationFailedException $e) { } try { Expectations::shouldNotBeNull(null); throw new Exception("shoulNotdBeNull should fail if something null"); } catch (PHPUnit_Framework_ExpectationFailedException $e) { } }