22
33namespace Clue \Tests \React \Soap ;
44
5- use Clue \ React \Block ;
5+ use React \Async ;
66use Clue \React \Soap \Client ;
77use Clue \React \Soap \Proxy ;
88use PHPUnit \Framework \TestCase ;
9- use React \EventLoop \Loop ;
109use React \Http \Browser ;
1110
1211class BankResponse
@@ -55,7 +54,7 @@ public function testBlzService()
5554
5655 $ promise = $ api ->getBank (array ('blz ' => '12070000 ' ));
5756
58- $ result = Block \await ($ promise, Loop:: get () );
57+ $ result = Async \await ($ promise );
5958
6059 $ this ->assertIsObject ($ result );
6160 $ this ->assertTrue (isset ($ result ->details ));
@@ -77,7 +76,7 @@ public function testBlzServiceWithClassmapReturnsExpectedType()
7776
7877 $ promise = $ api ->getBank (array ('blz ' => '12070000 ' ));
7978
80- $ result = Block \await ($ promise, Loop:: get () );
79+ $ result = Async \await ($ promise );
8180
8281 $ this ->assertInstanceOf ('Clue\Tests\React\Soap\BankResponse ' , $ result );
8382 $ this ->assertTrue (isset ($ result ->details ));
@@ -97,7 +96,7 @@ public function testBlzServiceWithSoapV12()
9796
9897 $ promise = $ api ->getBank (array ('blz ' => '12070000 ' ));
9998
100- $ result = Block \await ($ promise, Loop:: get () );
99+ $ result = Async \await ($ promise );
101100
102101 $ this ->assertIsObject ($ result );
103102 $ this ->assertTrue (isset ($ result ->details ));
@@ -117,7 +116,7 @@ public function testBlzServiceNonWsdlModeReturnedWithoutOuterResultStructure()
117116 // $promise = $api->getBank(new SoapParam('12070000', 'ns1:blz'));
118117 $ promise = $ api ->getBank (new \SoapVar ('12070000 ' , XSD_STRING , null , null , 'blz ' , 'http://thomas-bayer.com/blz/ ' ));
119118
120- $ result = Block \await ($ promise, Loop:: get () );
119+ $ result = Async \await ($ promise );
121120
122121 $ this ->assertIsObject ($ result );
123122 $ this ->assertFalse (isset ($ result ->details ));
@@ -158,7 +157,7 @@ public function testBlzServiceWithInvalidMethodRejectsWithSoapFault()
158157
159158 $ this ->expectException (\SoapFault::class);
160159 $ this ->expectExceptionMessage ('Function ("doesNotExist") is not a valid method for this service ' );
161- Block \await ($ promise, Loop:: get () );
160+ Async \await ($ promise );
162161 }
163162
164163 public function testCancelMethodRejectsWithRuntimeException ()
@@ -170,7 +169,7 @@ public function testCancelMethodRejectsWithRuntimeException()
170169
171170 $ this ->expectException (\RuntimeException::class);
172171 $ this ->expectExceptionMessage ('cancelled ' );
173- Block \await ($ promise, Loop:: get () );
172+ Async \await ($ promise );
174173 }
175174
176175 public function testTimeoutRejectsWithRuntimeException ()
@@ -185,7 +184,7 @@ public function testTimeoutRejectsWithRuntimeException()
185184
186185 $ this ->expectException (\RuntimeException::class);
187186 $ this ->expectExceptionMessage ('timed out ' );
188- Block \await ($ promise, Loop:: get () );
187+ Async \await ($ promise );
189188 }
190189
191190 public function testGetLocationForFunctionName ()
@@ -236,7 +235,7 @@ public function testWithLocationInvalidRejectsWithRuntimeException()
236235 $ promise = $ api ->getBank (array ('blz ' => '12070000 ' ));
237236
238237 $ this ->expectException (\RuntimeException::class);
239- Block \await ($ promise, Loop:: get () );
238+ Async \await ($ promise );
240239 }
241240
242241 public function testWithLocationRestoredToOriginalResolves ()
@@ -248,7 +247,7 @@ public function testWithLocationRestoredToOriginalResolves()
248247
249248 $ promise = $ api ->getBank (array ('blz ' => '12070000 ' ));
250249
251- $ result = Block \await ($ promise, Loop:: get () );
250+ $ result = Async \await ($ promise );
252251 $ this ->assertIsObject ($ result );
253252 }
254253}
0 commit comments