@@ -224,14 +224,12 @@ function () { throw new TransformationFailedException(); }
224
224
225
225
$ this ->validator ->validate ($ form , new Form ());
226
226
227
- $ is2Dot4Api = Validation::API_VERSION_2_4 === $ this ->getApiVersion ();
228
-
229
227
$ this ->buildViolation ('invalid_message_key ' )
230
228
->setParameter ('{{ value }} ' , 'foo ' )
231
229
->setParameter ('{{ foo }} ' , 'bar ' )
232
230
->setInvalidValue ('foo ' )
233
231
->setCode (Form::NOT_SYNCHRONIZED_ERROR )
234
- ->setCause ($ is2Dot4Api ? null : $ form ->getTransformationFailure ())
232
+ ->setCause ($ form ->getTransformationFailure ())
235
233
->assertRaised ();
236
234
}
237
235
@@ -261,14 +259,12 @@ function () { throw new TransformationFailedException(); }
261
259
262
260
$ this ->validator ->validate ($ form , new Form ());
263
261
264
- $ is2Dot4Api = Validation::API_VERSION_2_4 === $ this ->getApiVersion ();
265
-
266
262
$ this ->buildViolation ('invalid_message_key ' )
267
263
->setParameter ('{{ value }} ' , 'foo ' )
268
264
->setParameter ('{{ foo }} ' , 'bar ' )
269
265
->setInvalidValue ('foo ' )
270
266
->setCode (Form::NOT_SYNCHRONIZED_ERROR )
271
- ->setCause ($ is2Dot4Api ? null : $ form ->getTransformationFailure ())
267
+ ->setCause ($ form ->getTransformationFailure ())
272
268
->assertRaised ();
273
269
}
274
270
@@ -298,13 +294,11 @@ function () { throw new TransformationFailedException(); }
298
294
299
295
$ this ->validator ->validate ($ form , new Form ());
300
296
301
- $ is2Dot4Api = Validation::API_VERSION_2_4 === $ this ->getApiVersion ();
302
-
303
297
$ this ->buildViolation ('invalid_message_key ' )
304
298
->setParameter ('{{ value }} ' , 'foo ' )
305
299
->setInvalidValue ('foo ' )
306
300
->setCode (Form::NOT_SYNCHRONIZED_ERROR )
307
- ->setCause ($ is2Dot4Api ? null : $ form ->getTransformationFailure ())
301
+ ->setCause ($ form ->getTransformationFailure ())
308
302
->assertRaised ();
309
303
}
310
304
0 commit comments