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