validate('foo', new NotBlank()); } /** * @dataProvider getValidRoles */ public function testConstraintWithValidRole($role) { $constraint = new Role(); $validator = new RoleValidator(); $validator->validate($role, $constraint); // the above line would break if the role is invalid, we need the next assert to mark the test as valid $this->assertNull(null); } public function testValidationError() { $this->markTestIncomplete(__CLASS__ . ': validation message not tested yet'); } }