コード例 #1
0
ファイル: NotNullTest.php プロジェクト: ferodss/input
 public function testIsGettingErrorMessage()
 {
     $constraint = new NotNull();
     $this->assertFalse($constraint->validate(null));
     $this->assertEquals('[field] Unexpected empty content', $constraint->getErrorMessage('field'));
 }
コード例 #2
0
ファイル: NotNullTest.php プロジェクト: reisraff/input
 public function testErrorMessageIsCustomizable()
 {
     $constraint = new NotNull('CUSTOM!');
     $this->assertSame('[field] CUSTOM!', $constraint->getErrorMessage('field'));
 }