public function test_is_ok() { $result = new ValidationResult(); $error = new ValidationError('foo', 'bar', new StringConstraint()); $this->assertTrue($result->isOk()); $result->addError($error); $this->assertFalse($result->isOk()); }