예제 #1
0
 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;
 }
예제 #2
0
 public function testFailed()
 {
     $pc = new DummyCheck();
     $cr = new \Prereq\CheckResult(false, $pc);
     $this->assertTrue($cr->failed());
     $cr->setSucceed();
     $this->assertFalse($cr->failed());
 }