@@ -104,29 +104,7 @@ public function testValidateConstraints()
104
104
$ this ->assertNoViolation ();
105
105
}
106
106
107
- public function testValidateIfParentWithCascadeValidation ()
108
- {
109
- $ object = $ this ->getMock ('\stdClass ' );
110
-
111
- $ parent = $ this ->getBuilder ('parent ' , null , array ('cascade_validation ' => true ))
112
- ->setCompound (true )
113
- ->setDataMapper ($ this ->getDataMapper ())
114
- ->getForm ();
115
- $ options = array ('validation_groups ' => array ('group1 ' , 'group2 ' ));
116
- $ form = $ this ->getBuilder ('name ' , '\stdClass ' , $ options )->getForm ();
117
- $ parent ->add ($ form );
118
-
119
- $ form ->setData ($ object );
120
-
121
- $ this ->expectValidateAt (0 , 'data ' , $ object , 'group1 ' );
122
- $ this ->expectValidateAt (1 , 'data ' , $ object , 'group2 ' );
123
-
124
- $ this ->validator ->validate ($ form , new Form ());
125
-
126
- $ this ->assertNoViolation ();
127
- }
128
-
129
- public function testValidateIfChildWithValidConstraint ()
107
+ public function testValidateChildIfValidConstraint ()
130
108
{
131
109
$ object = $ this ->getMock ('\stdClass ' );
132
110
@@ -150,11 +128,11 @@ public function testValidateIfChildWithValidConstraint()
150
128
$ this ->assertNoViolation ();
151
129
}
152
130
153
- public function testDontValidateIfParentWithoutCascadeValidation ()
131
+ public function testDontValidateIfParentWithoutValidConstraint ()
154
132
{
155
133
$ object = $ this ->getMock ('\stdClass ' );
156
134
157
- $ parent = $ this ->getBuilder ('parent ' , null , array ( ' cascade_validation ' => false ) )
135
+ $ parent = $ this ->getBuilder ('parent ' , null )
158
136
->setCompound (true )
159
137
->setDataMapper ($ this ->getDataMapper ())
160
138
->getForm ();
@@ -184,13 +162,13 @@ public function testMissingConstraintIndex()
184
162
$ this ->assertNoViolation ();
185
163
}
186
164
187
- public function testValidateConstraintsEvenIfNoCascadeValidation ()
165
+ public function testValidateConstraintsOptionEvenIfNoValidConstraint ()
188
166
{
189
167
$ object = $ this ->getMock ('\stdClass ' );
190
168
$ constraint1 = new NotNull (array ('groups ' => array ('group1 ' , 'group2 ' )));
191
169
$ constraint2 = new NotBlank (array ('groups ' => 'group2 ' ));
192
170
193
- $ parent = $ this ->getBuilder ('parent ' , null , array ( ' cascade_validation ' => false ) )
171
+ $ parent = $ this ->getBuilder ('parent ' , null )
194
172
->setCompound (true )
195
173
->setDataMapper ($ this ->getDataMapper ())
196
174
->getForm ();
0 commit comments