Exemplo n.º 1
0
 public function testIsGettingErrorMessage()
 {
     $constraint = new GuidValue();
     $this->assertFalse($constraint->validate('0dga84b2-639d-4b06-bc87-7ab5ae3f5d4f'));
     $this->assertEquals('[field] Invalid GUID format', $constraint->getErrorMessage('field'));
 }
Exemplo n.º 2
0
 public function testErrorMessageIsCustomizable()
 {
     $constraint = new GuidValue('CUSTOM!');
     $this->assertSame('[field] CUSTOM!', $constraint->getErrorMessage('field'));
 }