Skip to content

Commit 79a9c28

Browse files
committed
removed the Validator BC layer for PHP < 5.3.9
1 parent e810904 commit 79a9c28

File tree

2 files changed

+3
-35
lines changed

2 files changed

+3
-35
lines changed

Tests/Extension/Validator/Constraints/FormValidatorTest.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,12 @@ function () { throw new TransformationFailedException(); }
224224

225225
$this->validator->validate($form, new Form());
226226

227-
$is2Dot4Api = Validation::API_VERSION_2_4 === $this->getApiVersion();
228-
229227
$this->buildViolation('invalid_message_key')
230228
->setParameter('{{ value }}', 'foo')
231229
->setParameter('{{ foo }}', 'bar')
232230
->setInvalidValue('foo')
233231
->setCode(Form::NOT_SYNCHRONIZED_ERROR)
234-
->setCause($is2Dot4Api ? null : $form->getTransformationFailure())
232+
->setCause($form->getTransformationFailure())
235233
->assertRaised();
236234
}
237235

@@ -261,14 +259,12 @@ function () { throw new TransformationFailedException(); }
261259

262260
$this->validator->validate($form, new Form());
263261

264-
$is2Dot4Api = Validation::API_VERSION_2_4 === $this->getApiVersion();
265-
266262
$this->buildViolation('invalid_message_key')
267263
->setParameter('{{ value }}', 'foo')
268264
->setParameter('{{ foo }}', 'bar')
269265
->setInvalidValue('foo')
270266
->setCode(Form::NOT_SYNCHRONIZED_ERROR)
271-
->setCause($is2Dot4Api ? null : $form->getTransformationFailure())
267+
->setCause($form->getTransformationFailure())
272268
->assertRaised();
273269
}
274270

@@ -298,13 +294,11 @@ function () { throw new TransformationFailedException(); }
298294

299295
$this->validator->validate($form, new Form());
300296

301-
$is2Dot4Api = Validation::API_VERSION_2_4 === $this->getApiVersion();
302-
303297
$this->buildViolation('invalid_message_key')
304298
->setParameter('{{ value }}', 'foo')
305299
->setInvalidValue('foo')
306300
->setCode(Form::NOT_SYNCHRONIZED_ERROR)
307-
->setCause($is2Dot4Api ? null : $form->getTransformationFailure())
301+
->setCause($form->getTransformationFailure())
308302
->assertRaised();
309303
}
310304

Tests/Extension/Validator/Constraints/LegacyFormValidator2Dot4ApiTest.php

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)