public function testIsGettingErrorMessage() { $constraint = new Enum(['foo', 'bar']); $this->assertFalse($constraint->validate('test'), 'The "test" value is not part of the Enum'); $this->assertEquals('Invalid option for enum. Allowed options are: foo, bar', $constraint->getErrorMessage()); }
public function testValidatePassNull() { $this->meta->null = true; $this->assertTrue($this->object->validate($this->meta, null)); }