public function check($myparam = null) { $res = new \Prereq\CheckResult(true, $this); if ($myparam !== true) { $res->setFailed("Uh Oh! MyParam must be set to true!"); } return $res; }
public function testFailed() { $pc = new DummyCheck(); $cr = new \Prereq\CheckResult(false, $pc); $this->assertTrue($cr->failed()); $cr->setSucceed(); $this->assertFalse($cr->failed()); }