public function isValid(Collection $reports)
 {
     foreach ($reports->toArray() as $report) {
         if ($report->pass === false) {
             return new ValidatorResult(false, $report->message);
         }
     }
     return new ValidatorResult(true, StringLiteral::fromNative(''));
 }
Example #2
0
 public function testToArray()
 {
     $array = array(new StringLiteral('one'), new StringLiteral('two'), new Integer(3));
     $this->assertEquals($array, $this->collection->toArray());
 }