You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -130,7 +134,7 @@ public function testMapToFormInheritingParentDataIfDataDoesNotMatch()
130
134
$this->mapper->mapViolation($violation, $parent);
131
135
132
136
$this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one');
133
-
$this->assertEquals(array($this->getFormError($violation)), iterator_to_array($child->getErrors()), $child->getName().' should have an error, but has none');
137
+
$this->assertEquals(array($this->getFormError($violation, $child)), iterator_to_array($child->getErrors()), $child->getName().' should have an error, but has none');
134
138
$this->assertCount(0, $grandChild->getErrors(), $grandChild->getName().' should not have an error, but has one');
135
139
}
136
140
@@ -159,7 +163,7 @@ public function testFollowDotRules()
159
163
$this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one');
160
164
$this->assertCount(0, $child->getErrors(), $child->getName().' should not have an error, but has one');
161
165
$this->assertCount(0, $grandChild->getErrors(), $grandChild->getName().' should not have an error, but has one');
162
-
$this->assertEquals(array($this->getFormError($violation)), iterator_to_array($grandGrandChild->getErrors()), $grandGrandChild->getName().' should have an error, but has none');
166
+
$this->assertEquals(array($this->getFormError($violation, $grandGrandChild)), iterator_to_array($grandGrandChild->getErrors()), $grandGrandChild->getName().' should have an error, but has none');
163
167
}
164
168
165
169
publicfunctiontestAbortMappingIfNotSynchronized()
@@ -800,17 +804,17 @@ public function testDefaultErrorMapping($target, $childName, $childPath, $grandC
800
804
$this->mapper->mapViolation($violation, $parent);
801
805
802
806
if (self::LEVEL_0 === $target) {
803
-
$this->assertEquals(array($this->getFormError($violation)), iterator_to_array($parent->getErrors()), $parent->getName().' should have an error, but has none');
807
+
$this->assertEquals(array($this->getFormError($violation, $parent)), iterator_to_array($parent->getErrors()), $parent->getName().' should have an error, but has none');
804
808
$this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one');
805
809
$this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one');
806
810
} elseif (self::LEVEL_1 === $target) {
807
811
$this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one');
808
-
$this->assertEquals(array($this->getFormError($violation)), iterator_to_array($child->getErrors()), $childName.' should have an error, but has none');
812
+
$this->assertEquals(array($this->getFormError($violation, $child)), iterator_to_array($child->getErrors()), $childName.' should have an error, but has none');
809
813
$this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one');
810
814
} else {
811
815
$this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one');
812
816
$this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one');
813
-
$this->assertEquals(array($this->getFormError($violation)), iterator_to_array($grandChild->getErrors()), $grandChildName.' should have an error, but has none');
817
+
$this->assertEquals(array($this->getFormError($violation, $grandChild)), iterator_to_array($grandChild->getErrors()), $grandChildName.' should have an error, but has none');
814
818
}
815
819
}
816
820
@@ -1274,17 +1278,17 @@ public function testCustomDataErrorMapping($target, $mapFrom, $mapTo, $childName
1274
1278
}
1275
1279
1276
1280
if (self::LEVEL_0 === $target) {
1277
-
$this->assertEquals(array($this->getFormError($violation)), iterator_to_array($parent->getErrors()), $parent->getName().' should have an error, but has none');
1281
+
$this->assertEquals(array($this->getFormError($violation, $parent)), iterator_to_array($parent->getErrors()), $parent->getName().' should have an error, but has none');
1278
1282
$this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one');
1279
1283
$this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one');
1280
1284
} elseif (self::LEVEL_1 === $target) {
1281
1285
$this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one');
1282
-
$this->assertEquals(array($this->getFormError($violation)), iterator_to_array($child->getErrors()), $childName.' should have an error, but has none');
1286
+
$this->assertEquals(array($this->getFormError($violation, $child)), iterator_to_array($child->getErrors()), $childName.' should have an error, but has none');
1283
1287
$this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one');
1284
1288
} else {
1285
1289
$this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one');
1286
1290
$this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one');
1287
-
$this->assertEquals(array($this->getFormError($violation)), iterator_to_array($grandChild->getErrors()), $grandChildName.' should have an error, but has none');
1291
+
$this->assertEquals(array($this->getFormError($violation, $grandChild)), iterator_to_array($grandChild->getErrors()), $grandChildName.' should have an error, but has none');
1288
1292
}
1289
1293
}
1290
1294
@@ -1458,24 +1462,24 @@ public function testCustomFormErrorMapping($target, $mapFrom, $mapTo, $errorName
1458
1462
1459
1463
if (self::LEVEL_0 === $target) {
1460
1464
$this->assertCount(0, $errorChild->getErrors(), $errorName.' should not have an error, but has one');
1461
-
$this->assertEquals(array($this->getFormError($violation)), iterator_to_array($parent->getErrors()), $parent->getName().' should have an error, but has none');
1465
+
$this->assertEquals(array($this->getFormError($violation, $parent)), iterator_to_array($parent->getErrors()), $parent->getName().' should have an error, but has none');
1462
1466
$this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one');
1463
1467
$this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one');
1464
1468
} elseif (self::LEVEL_1 === $target) {
1465
1469
$this->assertCount(0, $errorChild->getErrors(), $errorName.' should not have an error, but has one');
1466
1470
$this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one');
1467
-
$this->assertEquals(array($this->getFormError($violation)), iterator_to_array($child->getErrors()), $childName.' should have an error, but has none');
1471
+
$this->assertEquals(array($this->getFormError($violation, $child)), iterator_to_array($child->getErrors()), $childName.' should have an error, but has none');
1468
1472
$this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one');
1469
1473
} elseif (self::LEVEL_1B === $target) {
1470
-
$this->assertEquals(array($this->getFormError($violation)), iterator_to_array($errorChild->getErrors()), $errorName.' should have an error, but has none');
1474
+
$this->assertEquals(array($this->getFormError($violation, $errorChild)), iterator_to_array($errorChild->getErrors()), $errorName.' should have an error, but has none');
1471
1475
$this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one');
1472
1476
$this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one');
1473
1477
$this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one');
1474
1478
} else {
1475
1479
$this->assertCount(0, $errorChild->getErrors(), $errorName.' should not have an error, but has one');
1476
1480
$this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one');
1477
1481
$this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one');
1478
-
$this->assertEquals(array($this->getFormError($violation)), iterator_to_array($grandChild->getErrors()), $grandChildName.' should have an error, but has none');
1482
+
$this->assertEquals(array($this->getFormError($violation, $grandChild)), iterator_to_array($grandChild->getErrors()), $grandChildName.' should have an error, but has none');
1479
1483
}
1480
1484
}
1481
1485
@@ -1522,17 +1526,17 @@ public function testErrorMappingForFormInheritingParentData($target, $childName,
1522
1526
$this->mapper->mapViolation($violation, $parent);
1523
1527
1524
1528
if (self::LEVEL_0 === $target) {
1525
-
$this->assertEquals(array($this->getFormError($violation)), iterator_to_array($parent->getErrors()), $parent->getName().' should have an error, but has none');
1529
+
$this->assertEquals(array($this->getFormError($violation, $parent)), iterator_to_array($parent->getErrors()), $parent->getName().' should have an error, but has none');
1526
1530
$this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one');
1527
1531
$this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one');
1528
1532
} elseif (self::LEVEL_1 === $target) {
1529
1533
$this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one');
1530
-
$this->assertEquals(array($this->getFormError($violation)), iterator_to_array($child->getErrors()), $childName.' should have an error, but has none');
1534
+
$this->assertEquals(array($this->getFormError($violation, $child)), iterator_to_array($child->getErrors()), $childName.' should have an error, but has none');
1531
1535
$this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one');
1532
1536
} else {
1533
1537
$this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one');
1534
1538
$this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one');
1535
-
$this->assertEquals(array($this->getFormError($violation)), iterator_to_array($grandChild->getErrors()), $grandChildName.' should have an error, but has none');
1539
+
$this->assertEquals(array($this->getFormError($violation, $grandChild)), iterator_to_array($grandChild->getErrors()), $grandChildName.' should have an error, but has none');
0 commit comments