File tree 2 files changed +20
-1
lines changed
src/Symfony/Component/Validator/Mapping
tests/Symfony/Tests/Component/Validator/Mapping
2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,8 @@ public function __sleep()
71
71
'class ' ,
72
72
'name ' ,
73
73
'property ' ,
74
- 'cascaded ' , // TESTME
74
+ 'cascaded ' ,
75
+ 'collectionCascaded ' ,
75
76
));
76
77
}
77
78
Original file line number Diff line number Diff line change @@ -73,6 +73,24 @@ public function testSerialize()
73
73
74
74
$ this ->assertEquals ($ this ->metadata , $ metadata );
75
75
}
76
+
77
+ public function testSerializeCollectionCascaded ()
78
+ {
79
+ $ this ->metadata ->addConstraint (new Valid (array ('traverse ' => true )));
80
+
81
+ $ metadata = unserialize (serialize ($ this ->metadata ));
82
+
83
+ $ this ->assertEquals ($ this ->metadata , $ metadata );
84
+ }
85
+
86
+ public function testSerializeCollectionNotCascaded ()
87
+ {
88
+ $ this ->metadata ->addConstraint (new Valid (array ('traverse ' => false )));
89
+
90
+ $ metadata = unserialize (serialize ($ this ->metadata ));
91
+
92
+ $ this ->assertEquals ($ this ->metadata , $ metadata );
93
+ }
76
94
}
77
95
78
96
class TestMemberMetadata extends MemberMetadata
You can’t perform that action at this time.
0 commit comments