@@ -87,7 +87,7 @@ public function testEmitsConnectionWithRemoteIp()
8787
8888 $ peer = Block \await ($ peer , $ loop , self ::TIMEOUT );
8989
90- $ this ->assertContains ('127.0.0.1: ' , $ peer );
90+ $ this ->assertContainsString ('127.0.0.1: ' , $ peer );
9191 }
9292
9393 public function testEmitsConnectionWithLocalIp ()
@@ -110,7 +110,7 @@ public function testEmitsConnectionWithLocalIp()
110110
111111 $ local = Block \await ($ peer , $ loop , self ::TIMEOUT );
112112
113- $ this ->assertContains ('127.0.0.1: ' , $ local );
113+ $ this ->assertContainsString ('127.0.0.1: ' , $ local );
114114 $ this ->assertEquals ($ server ->getAddress (), $ local );
115115 }
116116
@@ -136,7 +136,7 @@ public function testEmitsConnectionWithLocalIpDespiteListeningOnAll()
136136
137137 $ local = Block \await ($ peer , $ loop , self ::TIMEOUT );
138138
139- $ this ->assertContains ('127.0.0.1: ' , $ local );
139+ $ this ->assertContainsString ('127.0.0.1: ' , $ local );
140140 }
141141
142142 public function testEmitsConnectionWithRemoteIpAfterConnectionIsClosedByPeer ()
@@ -159,7 +159,7 @@ public function testEmitsConnectionWithRemoteIpAfterConnectionIsClosedByPeer()
159159
160160 $ peer = Block \await ($ peer , $ loop , self ::TIMEOUT );
161161
162- $ this ->assertContains ('127.0.0.1: ' , $ peer );
162+ $ this ->assertContainsString ('127.0.0.1: ' , $ peer );
163163 }
164164
165165 public function testEmitsConnectionWithRemoteNullAddressAfterConnectionIsClosedByServer ()
@@ -255,7 +255,7 @@ public function testEmitsConnectionWithRemoteIpv6()
255255
256256 $ peer = Block \await ($ peer , $ loop , self ::TIMEOUT );
257257
258- $ this ->assertContains ('[::1]: ' , $ peer );
258+ $ this ->assertContainsString ('[::1]: ' , $ peer );
259259 }
260260
261261 public function testEmitsConnectionWithLocalIpv6 ()
@@ -281,7 +281,7 @@ public function testEmitsConnectionWithLocalIpv6()
281281
282282 $ local = Block \await ($ peer , $ loop , self ::TIMEOUT );
283283
284- $ this ->assertContains ('[::1]: ' , $ local );
284+ $ this ->assertContainsString ('[::1]: ' , $ local );
285285 $ this ->assertEquals ($ server ->getAddress (), $ local );
286286 }
287287
@@ -314,43 +314,35 @@ public function testEmitsConnectionWithInheritedContextOptions()
314314 $ this ->assertEquals (array ('socket ' => array ('backlog ' => 4 )), $ all );
315315 }
316316
317- /**
318- * @expectedException InvalidArgumentException
319- */
320317 public function testFailsToListenOnInvalidUri ()
321318 {
322319 $ loop = Factory::create ();
323320
321+ $ this ->setExpectedException ('InvalidArgumentException ' );
324322 new TcpServer ('/// ' , $ loop );
325323 }
326324
327- /**
328- * @expectedException InvalidArgumentException
329- */
330325 public function testFailsToListenOnUriWithoutPort ()
331326 {
332327 $ loop = Factory::create ();
333328
329+ $ this ->setExpectedException ('InvalidArgumentException ' );
334330 new TcpServer ('127.0.0.1 ' , $ loop );
335331 }
336332
337- /**
338- * @expectedException InvalidArgumentException
339- */
340333 public function testFailsToListenOnUriWithWrongScheme ()
341334 {
342335 $ loop = Factory::create ();
343336
337+ $ this ->setExpectedException ('InvalidArgumentException ' );
344338 new TcpServer ('udp://127.0.0.1:0 ' , $ loop );
345339 }
346340
347- /**
348- * @expectedException InvalidArgumentException
349- */
350341 public function testFailsToListenOnUriWIthHostname ()
351342 {
352343 $ loop = Factory::create ();
353344
345+ $ this ->setExpectedException ('InvalidArgumentException ' );
354346 new TcpServer ('localhost:8080 ' , $ loop );
355347 }
356348}
0 commit comments