/** * @test */ public function ShouldBeTrueShouldBehaveJustLikeassertTrue() { Expectations::shouldBeTrue(true); self::assertTrue(true); try { self::assertTrue(false); throw new Exception("assertTrue should fail with false"); } catch (PHPUnit_Framework_ExpectationFailedException $e) { } try { Expectations::shouldBeTrue(false); throw new Exception("assertTrue should fail with false"); } catch (PHPUnit_Framework_ExpectationFailedException $e) { } }
public function checked() { Expectations::shouldNotBeNull($this->__getLastVisitedLocation(), "No element was specified. Did you forget the call to shouldSee ?"); Expectations::shouldBeTrue($this->__getSelenium()->isChecked($this->__getLastVisitedLocation())); $this->__resetLastVisitedLocation(); }