66use React \EventLoop \StreamSelectLoop ;
77use React \Promise \Deferred ;
88use React \Promise \PromiseInterface ;
9- use function Clue \React \Block \await ;
109
1110class FunctionalTest extends TestCase
1211{
@@ -33,7 +32,7 @@ public function testPing()
3332 $ promise = $ redis ->ping ();
3433 $ this ->assertInstanceOf (PromiseInterface::class, $ promise );
3534
36- $ ret = await ($ promise, $ this -> loop );
35+ $ ret = \ React \ Async \ await ($ promise );
3736
3837 $ this ->assertEquals ('PONG ' , $ ret );
3938 }
@@ -45,7 +44,7 @@ public function testPingLazy()
4544 $ promise = $ redis ->ping ();
4645 $ this ->assertInstanceOf (PromiseInterface::class, $ promise );
4746
48- $ ret = await ($ promise, $ this -> loop );
47+ $ ret = \ React \ Async \ await ($ promise );
4948
5049 $ this ->assertEquals ('PONG ' , $ ret );
5150 }
@@ -83,7 +82,7 @@ public function testMgetIsNotInterpretedAsSubMessage()
8382 $ promise = $ redis ->mget ('message ' , 'channel ' , 'payload ' )->then ($ this ->expectCallableOnce ());
8483 $ redis ->on ('message ' , $ this ->expectCallableNever ());
8584
86- await ($ promise, $ this -> loop );
85+ \ React \ Async \ await ($ promise );
8786 }
8887
8988 public function testPipeline ()
@@ -95,7 +94,7 @@ public function testPipeline()
9594 $ redis ->incr ('a ' )->then ($ this ->expectCallableOnceWith (3 ));
9695 $ promise = $ redis ->get ('a ' )->then ($ this ->expectCallableOnceWith ('3 ' ));
9796
98- await ($ promise, $ this -> loop );
97+ \ React \ Async \ await ($ promise );
9998 }
10099
101100 public function testInvalidCommand ()
@@ -108,7 +107,7 @@ public function testInvalidCommand()
108107 } else {
109108 $ this ->setExpectedException ('Exception ' );
110109 }
111- await ($ promise, $ this -> loop );
110+ \ React \ Async \ await ($ promise );
112111 }
113112
114113 public function testMultiExecEmpty ()
@@ -117,7 +116,7 @@ public function testMultiExecEmpty()
117116 $ redis ->multi ()->then ($ this ->expectCallableOnceWith ('OK ' ));
118117 $ promise = $ redis ->exec ()->then ($ this ->expectCallableOnceWith ([]));
119118
120- await ($ promise, $ this -> loop );
119+ \ React \ Async \ await ($ promise );
121120 }
122121
123122 public function testMultiExecQueuedExecHasValues ()
@@ -131,7 +130,7 @@ public function testMultiExecQueuedExecHasValues()
131130 $ redis ->ttl ('b ' )->then ($ this ->expectCallableOnceWith ('QUEUED ' ));
132131 $ promise = $ redis ->exec ()->then ($ this ->expectCallableOnceWith (['OK ' , 1 , 12 , 20 ]));
133132
134- await ($ promise, $ this -> loop );
133+ \ React \ Async \ await ($ promise );
135134 }
136135
137136 public function testPubSub ()
@@ -152,7 +151,7 @@ public function testPubSub()
152151 })->then ($ this ->expectCallableOnce ());
153152
154153 // expect "message" event to take no longer than 0.1s
155- await ($ deferred ->promise (), $ this -> loop , 0.1 );
154+ \ React \ Async \ await ($ deferred ->promise ());
156155 }
157156
158157 public function testClose ()
0 commit comments