|
|
@@ -432,4 +432,16 @@ class Zend_Validate_BarcodeTest extends PHPUnit_Framework_TestCase
|
|
|
$this->assertTrue($barcode->isValid('123456'));
|
|
|
$this->assertTrue($barcode->isValid('0234567'));
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @group ZF-10116
|
|
|
+ */
|
|
|
+ public function testArrayLengthMessage()
|
|
|
+ {
|
|
|
+ $barcode = new Zend_Validate_Barcode('ean8');
|
|
|
+ $this->assertFalse($barcode->isValid('123'));
|
|
|
+ $message = $barcode->getMessages();
|
|
|
+ $this->assertTrue(array_key_exists('barcodeInvalidLength', $message));
|
|
|
+ $this->assertContains("length of 7/8 characters", $message['barcodeInvalidLength']);
|
|
|
+ }
|
|
|
}
|