Пример #1
0
 /**
  * Validate that correct value is returned
  */
 public function validate(Result $result)
 {
     $return = $this->makeString($result->getReturnValue());
     if (!$this->regexp->isMatch($return)) {
         return new ReturnObj\Failure("Failed asserting that return value matches {$this->regexp}");
     }
     return new ReturnObj\Success("Asserted that return value matches {$this->regexp}");
 }