@@ -309,7 +309,7 @@ function testLinkWithMock() {
309
309
'request ' , array ('/posts/view/1 ' , $ options )
310
310
));
311
311
$ this ->Js ->TestJsEngine ->expectAt (2 , 'dispatchMethod ' , array (
312
- 'event ' , array ('click ' , 'ajax code ' , $ options )
312
+ 'event ' , array ('click ' , 'ajax code ' , $ options + array ( ' buffer ' => null ) )
313
313
));
314
314
315
315
$ result = $ this ->Js ->link ('test link ' , '/posts/view/1 ' , $ options );
@@ -362,7 +362,9 @@ function testLinkWithMock() {
362
362
*/
363
363
function testLinkWithNoBuffering () {
364
364
$ this ->_useMock ();
365
- $ this ->Js ->TestJsEngine ->setReturnValue ('dispatchMethod ' , 'ajax code ' , array ('request ' , '* ' ));
365
+ $ this ->Js ->TestJsEngine ->setReturnValue ('dispatchMethod ' , 'ajax code ' , array (
366
+ 'request ' , array ('/posts/view/1 ' , array ('update ' => '#content ' ))
367
+ ));
366
368
$ this ->Js ->TestJsEngine ->setReturnValue ('dispatchMethod ' , '-event handler- ' , array ('event ' , '* ' ));
367
369
368
370
$ options = array ('update ' => '#content ' , 'buffer ' => false );
@@ -411,7 +413,7 @@ function testSubmitWithMock() {
411
413
412
414
$ params = array (
413
415
'update ' => $ options ['update ' ], 'data ' => 'serialize-code ' ,
414
- 'method ' => 'post ' , 'dataExpression ' => true
416
+ 'method ' => 'post ' , 'dataExpression ' => true , ' buffer ' => null
415
417
);
416
418
$ this ->Js ->TestJsEngine ->expectAt (3 , 'dispatchMethod ' , array (
417
419
'event ' , array ('click ' , "ajax-code " , $ params )
@@ -440,7 +442,7 @@ function testSubmitWithMock() {
440
442
441
443
$ params = array (
442
444
'update ' => '#content ' , 'data ' => 'serialize-code ' ,
443
- 'method ' => 'post ' , 'dataExpression ' => true
445
+ 'method ' => 'post ' , 'dataExpression ' => true , ' buffer ' => null
444
446
);
445
447
$ this ->Js ->TestJsEngine ->expectAt (7 , 'dispatchMethod ' , array (
446
448
'event ' , array ('click ' , "ajax-code " , $ params )
@@ -471,11 +473,13 @@ function testSubmitWithNoBuffer() {
471
473
472
474
$ this ->Js ->TestJsEngine ->expectAt (0 , 'dispatchMethod ' , array ('get ' , '* ' ));
473
475
$ this ->Js ->TestJsEngine ->expectAt (1 , 'dispatchMethod ' , array (new PatternExpectation ('/serializeForm/i ' ), '* ' ));
474
- $ this ->Js ->TestJsEngine ->expectAt (2 , 'dispatchMethod ' , array ('request ' , '* ' ));
476
+ $ this ->Js ->TestJsEngine ->expectAt (2 , 'dispatchMethod ' , array ('request ' , array (
477
+ '' , array ('update ' => $ options ['update ' ], 'data ' => 'serialize-code ' , 'method ' => 'post ' , 'dataExpression ' => true )
478
+ )));
475
479
476
480
$ params = array (
477
- 'update ' => $ options ['update ' ], 'buffer ' => false , ' safe ' => false , ' data ' => 'serialize-code ' ,
478
- 'method ' => 'post ' , 'dataExpression ' => true
481
+ 'update ' => $ options ['update ' ], 'data ' => 'serialize-code ' ,
482
+ 'method ' => 'post ' , 'dataExpression ' => true , ' buffer ' => false
479
483
);
480
484
$ this ->Js ->TestJsEngine ->expectAt (3 , 'dispatchMethod ' , array (
481
485
'event ' , array ('click ' , "ajax-code " , $ params )
0 commit comments