[BUGFIX] Fix unit test for NumberRangeValidator
authorTobias Liebig <tobias.liebig@typo3.org>
Wed, 27 Jun 2012 11:19:51 +0000 (13:19 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 20 Jul 2012 14:11:12 +0000 (16:11 +0200)
While back porting changes (#35255) a unit test broke in
Validation_Validator_BeforeExtbase14_NumberRangeValidatorTest.

Change-Id: I31309474866e5edae747ea420e94e65d1638758f
Resolves: #38426
Releases: 6.0

typo3/sysext/extbase/Tests/Unit/Validation/Validator/BeforeExtbase14/NumberRangeValidatorTest.php

index dbab0b0..ea9fc03 100644 (file)
@@ -79,7 +79,7 @@ class Tx_Extbase_Tests_Unit_Validation_Validator_BeforeExtbase14_NumberRangeVali
         */
        public function numberRangeValidatorCreatesTheCorrectErrorForANumberOutOfRange() {
                $numberRangeValidator = $this->getMock('Tx_Extbase_Validation_Validator_NumberRangeValidator', array('addError'), array(), '', FALSE);
         */
        public function numberRangeValidatorCreatesTheCorrectErrorForANumberOutOfRange() {
                $numberRangeValidator = $this->getMock('Tx_Extbase_Validation_Validator_NumberRangeValidator', array('addError'), array(), '', FALSE);
-               $numberRangeValidator->expects($this->once())->method('addError')->with('The given subject was not in the valid range (1 - 42).', 1221561046);
+               $numberRangeValidator->expects($this->once())->method('addError')->with('The given subject was not in the valid range (%1$d - %2$d).', 1221561046, array(1, 42));
                $numberRangeValidator->setOptions(array('startRange' => 1, 'endRange' => 42));
                $numberRangeValidator->isValid(4711);
        }
                $numberRangeValidator->setOptions(array('startRange' => 1, 'endRange' => 42));
                $numberRangeValidator->isValid(4711);
        }