@@ -206,23 +206,15 @@ public function testSubRequest()
206206 $ sfErrors ,
207207 'Sub request: a form was validated on the server side '
208208 );
209- $ this ->assertEquals (
210- 'disabled_validation ' ,
211- $ this ->find ('#extra_msg ' )->getText (),
212- 'Sub request: marker form the server side exists '
213- );
209+ $ this ->assertTrue ($ this ->wasPostRequest ());
214210
215211 $ fpErrors = $ this ->getAllErrorsOnPage ('sub_request/-/1 ' );
216212 $ this ->assertEquals (
217213 array ('enabled_field ' ),
218214 $ fpErrors ,
219215 'Sub request: a form was validated on the JS side '
220216 );
221- $ this ->assertEquals (
222- '' ,
223- $ this ->find ('#extra_msg ' )->getText (),
224- 'Sub request: marker form the server side does not exist '
225- );
217+ $ this ->assertFalse ($ this ->wasPostRequest ());
226218 }
227219
228220 /**
@@ -340,11 +332,15 @@ public function testCollection()
340332 public function testEmptyChoice ()
341333 {
342334 $ sfErrors = $ this ->getAllErrorsOnPage ('empty_choice/1/0 ' , null , 'form_choice_submit ' );
335+ $ this ->assertTrue ($ this ->wasPostRequest ());
343336 $ fpErrors = $ this ->getAllErrorsOnPage ('empty_choice/1/1 ' , null , 'form_choice_submit ' );
337+ $ this ->assertTrue ($ this ->wasPostRequest ());
344338 $ this ->assertErrorsEqual ($ sfErrors , $ fpErrors , 'Choice fields are valid. ' );
345339
346340 $ sfErrors = $ this ->getAllErrorsOnPage ('empty_choice/0/0 ' , null , 'form_choice_submit ' );
341+ $ this ->assertTrue ($ this ->wasPostRequest ());
347342 $ fpErrors = $ this ->getAllErrorsOnPage ('empty_choice/0/1 ' , null , 'form_choice_submit ' );
343+ $ this ->assertFalse ($ this ->wasPostRequest ());
348344 $ this ->assertErrorsEqual ($ sfErrors , $ fpErrors , 'Choice fields have all the errors. ' );
349345 }
350346
0 commit comments