@@ -214,7 +214,7 @@ public function testExecAfterExecWillNotStartIdleTimerWhenFirstExecResolves()
214
214
215
215
$ this ->db ->exec ('CREATE ' );
216
216
$ this ->db ->exec ('CREATE ' );
217
- $ deferred ->resolve ();
217
+ $ deferred ->resolve (null );
218
218
}
219
219
220
220
public function testExecAfterExecWillStartAndCancelIdleTimerWhenSecondExecStartsAfterFirstResolves ()
@@ -233,15 +233,15 @@ public function testExecAfterExecWillStartAndCancelIdleTimerWhenSecondExecStarts
233
233
$ this ->loop ->expects ($ this ->once ())->method ('cancelTimer ' )->with ($ timer );
234
234
235
235
$ this ->db ->exec ('CREATE ' );
236
- $ deferred ->resolve ();
236
+ $ deferred ->resolve (null );
237
237
$ this ->db ->exec ('CREATE ' );
238
238
}
239
239
240
240
public function testExecFollowedByIdleTimerWillQuitUnderlyingConnectionWithoutCloseEvent ()
241
241
{
242
242
$ client = $ this ->getMockBuilder ('Clue\React\SQLite\Io\ProcessIoDatabase ' )->disableOriginalConstructor ()->setMethods (array ('exec ' , 'quit ' , 'close ' ))->getMock ();
243
- $ client ->expects ($ this ->once ())->method ('exec ' )->willReturn (\React \Promise \resolve ());
244
- $ client ->expects ($ this ->once ())->method ('quit ' )->willReturn (\React \Promise \resolve ());
243
+ $ client ->expects ($ this ->once ())->method ('exec ' )->willReturn (\React \Promise \resolve (null ));
244
+ $ client ->expects ($ this ->once ())->method ('quit ' )->willReturn (\React \Promise \resolve (null ));
245
245
$ client ->expects ($ this ->never ())->method ('close ' );
246
246
247
247
$ this ->factory ->expects ($ this ->once ())->method ('open ' )->willReturn (\React \Promise \resolve ($ client ));
@@ -264,8 +264,8 @@ public function testExecFollowedByIdleTimerWillQuitUnderlyingConnectionWithoutCl
264
264
public function testExecFollowedByIdleTimerWillCloseUnderlyingConnectionWhenQuitFails ()
265
265
{
266
266
$ client = $ this ->getMockBuilder ('Clue\React\SQLite\Io\ProcessIoDatabase ' )->setMethods (array ('exec ' , 'quit ' , 'close ' ))->disableOriginalConstructor ()->getMock ();
267
- $ client ->expects ($ this ->once ())->method ('exec ' )->willReturn (\React \Promise \resolve ());
268
- $ client ->expects ($ this ->once ())->method ('quit ' )->willReturn (\React \Promise \reject ());
267
+ $ client ->expects ($ this ->once ())->method ('exec ' )->willReturn (\React \Promise \resolve (null ));
268
+ $ client ->expects ($ this ->once ())->method ('quit ' )->willReturn (\React \Promise \reject (new \ RuntimeException () ));
269
269
$ client ->expects ($ this ->once ())->method ('close ' );
270
270
271
271
$ this ->factory ->expects ($ this ->once ())->method ('open ' )->willReturn (\React \Promise \resolve ($ client ));
@@ -288,7 +288,7 @@ public function testExecFollowedByIdleTimerWillCloseUnderlyingConnectionWhenQuit
288
288
public function testExecAfterIdleTimerWillCloseUnderlyingConnectionBeforeCreatingSecondConnection ()
289
289
{
290
290
$ client = $ this ->getMockBuilder ('Clue\React\SQLite\Io\ProcessIoDatabase ' )->setMethods (array ('exec ' , 'quit ' , 'close ' ))->disableOriginalConstructor ()->getMock ();
291
- $ client ->expects ($ this ->once ())->method ('exec ' )->willReturn (\React \Promise \resolve ());
291
+ $ client ->expects ($ this ->once ())->method ('exec ' )->willReturn (\React \Promise \resolve (null ));
292
292
$ client ->expects ($ this ->once ())->method ('quit ' )->willReturn (new Promise (function () { }));
293
293
$ client ->expects ($ this ->once ())->method ('close ' );
294
294
@@ -441,7 +441,7 @@ public function testQueryAfterQueryWillNotStartIdleTimerWhenFirstQueryResolves()
441
441
442
442
$ this ->db ->query ('CREATE ' );
443
443
$ this ->db ->query ('CREATE ' );
444
- $ deferred ->resolve ();
444
+ $ deferred ->resolve (null );
445
445
}
446
446
447
447
public function testQueryAfterQueryWillStartAndCancelIdleTimerWhenSecondQueryStartsAfterFirstResolves ()
@@ -460,15 +460,15 @@ public function testQueryAfterQueryWillStartAndCancelIdleTimerWhenSecondQuerySta
460
460
$ this ->loop ->expects ($ this ->once ())->method ('cancelTimer ' )->with ($ timer );
461
461
462
462
$ this ->db ->query ('CREATE ' );
463
- $ deferred ->resolve ();
463
+ $ deferred ->resolve (null );
464
464
$ this ->db ->query ('CREATE ' );
465
465
}
466
466
467
467
public function testQueryFollowedByIdleTimerWillQuitUnderlyingConnectionWithoutCloseEvent ()
468
468
{
469
469
$ client = $ this ->getMockBuilder ('Clue\React\SQLite\Io\ProcessIoDatabase ' )->disableOriginalConstructor ()->setMethods (array ('query ' , 'quit ' , 'close ' ))->getMock ();
470
- $ client ->expects ($ this ->once ())->method ('query ' )->willReturn (\React \Promise \resolve ());
471
- $ client ->expects ($ this ->once ())->method ('quit ' )->willReturn (\React \Promise \resolve ());
470
+ $ client ->expects ($ this ->once ())->method ('query ' )->willReturn (\React \Promise \resolve (null ));
471
+ $ client ->expects ($ this ->once ())->method ('quit ' )->willReturn (\React \Promise \resolve (null ));
472
472
$ client ->expects ($ this ->never ())->method ('close ' );
473
473
474
474
$ this ->factory ->expects ($ this ->once ())->method ('open ' )->willReturn (\React \Promise \resolve ($ client ));
@@ -531,7 +531,7 @@ public function testCloseAfterExecWillEmitCloseWithoutErrorWhenUnderlyingDatabas
531
531
public function testCloseAfterExecWillCloseUnderlyingDatabaseConnectionWhenAlreadyResolved ()
532
532
{
533
533
$ client = $ this ->getMockBuilder ('Clue\React\SQLite\DatabaseInterface ' )->getMock ();
534
- $ client ->expects ($ this ->once ())->method ('exec ' )->willReturn (\React \Promise \resolve ());
534
+ $ client ->expects ($ this ->once ())->method ('exec ' )->willReturn (\React \Promise \resolve (null ));
535
535
$ client ->expects ($ this ->once ())->method ('close ' );
536
536
537
537
$ deferred = new Deferred ();
@@ -556,7 +556,7 @@ public function testCloseAfterExecWillCancelIdleTimerWhenExecIsAlreadyResolved()
556
556
$ this ->loop ->expects ($ this ->once ())->method ('cancelTimer ' )->with ($ timer );
557
557
558
558
$ this ->db ->exec ('CREATE ' );
559
- $ deferred ->resolve ();
559
+ $ deferred ->resolve (null );
560
560
$ this ->db ->close ();
561
561
}
562
562
@@ -586,7 +586,7 @@ public function testCloseAfterExecRejectsWillEmitClose()
586
586
public function testCloseAfterQuitAfterExecWillCloseUnderlyingConnectionWhenQuitIsStillPending ()
587
587
{
588
588
$ client = $ this ->getMockBuilder ('Clue\React\SQLite\DatabaseInterface ' )->getMock ();
589
- $ client ->expects ($ this ->once ())->method ('exec ' )->willReturn (\React \Promise \resolve ());
589
+ $ client ->expects ($ this ->once ())->method ('exec ' )->willReturn (\React \Promise \resolve (null ));
590
590
$ client ->expects ($ this ->once ())->method ('quit ' )->willReturn (new Promise (function () { }));
591
591
$ client ->expects ($ this ->once ())->method ('close ' );
592
592
@@ -600,7 +600,7 @@ public function testCloseAfterQuitAfterExecWillCloseUnderlyingConnectionWhenQuit
600
600
public function testCloseAfterExecAfterIdleTimeoutWillCloseUnderlyingConnectionWhenQuitIsStillPending ()
601
601
{
602
602
$ client = $ this ->getMockBuilder ('Clue\React\SQLite\DatabaseInterface ' )->getMock ();
603
- $ client ->expects ($ this ->once ())->method ('exec ' )->willReturn (\React \Promise \resolve ());
603
+ $ client ->expects ($ this ->once ())->method ('exec ' )->willReturn (\React \Promise \resolve (null ));
604
604
$ client ->expects ($ this ->once ())->method ('quit ' )->willReturn (new Promise (function () { }));
605
605
$ client ->expects ($ this ->once ())->method ('close ' );
606
606
@@ -657,7 +657,7 @@ public function testQuitAfterExecWillCloseDatabaseWhenUnderlyingDatabaseEmitsClo
657
657
{
658
658
$ client = $ this ->getMockBuilder ('Clue\React\SQLite\Io\ProcessIoDatabase ' )->disableOriginalConstructor ()->setMethods (array ('exec ' , 'quit ' ))->getMock ();
659
659
$ client ->expects ($ this ->once ())->method ('exec ' )->willReturn (\React \Promise \resolve ('PONG ' ));
660
- $ client ->expects ($ this ->once ())->method ('quit ' )->willReturn (\React \Promise \resolve ());
660
+ $ client ->expects ($ this ->once ())->method ('quit ' )->willReturn (\React \Promise \resolve (null ));
661
661
662
662
$ deferred = new Deferred ();
663
663
$ this ->factory ->expects ($ this ->once ())->method ('open ' )->willReturn ($ deferred ->promise ());
@@ -677,7 +677,7 @@ public function testEmitsNoErrorEventWhenUnderlyingDatabaseEmitsError()
677
677
$ error = new \RuntimeException ();
678
678
679
679
$ client = $ this ->getMockBuilder ('Clue\React\SQLite\Io\ProcessIoDatabase ' )->disableOriginalConstructor ()->setMethods (array ('exec ' ))->getMock ();
680
- $ client ->expects ($ this ->once ())->method ('exec ' )->willReturn (\React \Promise \resolve ());
680
+ $ client ->expects ($ this ->once ())->method ('exec ' )->willReturn (\React \Promise \resolve (null ));
681
681
682
682
$ deferred = new Deferred ();
683
683
$ this ->factory ->expects ($ this ->once ())->method ('open ' )->willReturn ($ deferred ->promise ());
@@ -692,7 +692,7 @@ public function testEmitsNoErrorEventWhenUnderlyingDatabaseEmitsError()
692
692
public function testEmitsNoCloseEventWhenUnderlyingDatabaseEmitsClose ()
693
693
{
694
694
$ client = $ this ->getMockBuilder ('Clue\React\SQLite\Io\ProcessIoDatabase ' )->disableOriginalConstructor ()->setMethods (array ('exec ' ))->getMock ();
695
- $ client ->expects ($ this ->once ())->method ('exec ' )->willReturn (\React \Promise \resolve ());
695
+ $ client ->expects ($ this ->once ())->method ('exec ' )->willReturn (\React \Promise \resolve (null ));
696
696
697
697
$ deferred = new Deferred ();
698
698
$ this ->factory ->expects ($ this ->once ())->method ('open ' )->willReturn ($ deferred ->promise ());
@@ -719,7 +719,7 @@ public function testEmitsNoCloseEventButWillCancelIdleTimerWhenUnderlyingConnect
719
719
$ this ->db ->on ('close ' , $ this ->expectCallableNever ());
720
720
721
721
$ this ->db ->exec ('CREATE ' );
722
- $ deferred ->resolve ();
722
+ $ deferred ->resolve (null );
723
723
724
724
$ client ->emit ('close ' );
725
725
}
0 commit comments