@@ -40,8 +40,8 @@ public function testPlainHttpOnRandomPort()
4040
4141 $ response = Block \await ($ result , $ loop , 1.0 );
4242
43- $ this ->assertContains ("HTTP/1.0 200 OK " , $ response );
44- $ this ->assertContains ('http:// ' . noScheme ($ socket ->getAddress ()) . '/ ' , $ response );
43+ $ this ->assertContainsString ("HTTP/1.0 200 OK " , $ response );
44+ $ this ->assertContainsString ('http:// ' . noScheme ($ socket ->getAddress ()) . '/ ' , $ response );
4545
4646 $ socket ->close ();
4747 }
@@ -68,7 +68,7 @@ function () {
6868
6969 $ response = Block \await ($ result , $ loop , 1.0 );
7070
71- $ this ->assertContains ("HTTP/1.0 404 Not Found " , $ response );
71+ $ this ->assertContainsString ("HTTP/1.0 404 Not Found " , $ response );
7272
7373 $ socket ->close ();
7474 }
@@ -93,8 +93,8 @@ public function testPlainHttpOnRandomPortWithoutHostHeaderUsesSocketUri()
9393
9494 $ response = Block \await ($ result , $ loop , 1.0 );
9595
96- $ this ->assertContains ("HTTP/1.0 200 OK " , $ response );
97- $ this ->assertContains ('http:// ' . noScheme ($ socket ->getAddress ()) . '/ ' , $ response );
96+ $ this ->assertContainsString ("HTTP/1.0 200 OK " , $ response );
97+ $ this ->assertContainsString ('http:// ' . noScheme ($ socket ->getAddress ()) . '/ ' , $ response );
9898
9999 $ socket ->close ();
100100 }
@@ -119,16 +119,16 @@ public function testPlainHttpOnRandomPortWithOtherHostHeaderTakesPrecedence()
119119
120120 $ response = Block \await ($ result , $ loop , 1.0 );
121121
122- $ this ->assertContains ("HTTP/1.0 200 OK " , $ response );
123- $ this ->assertContains ('http://localhost:1000/ ' , $ response );
122+ $ this ->assertContainsString ("HTTP/1.0 200 OK " , $ response );
123+ $ this ->assertContainsString ('http://localhost:1000/ ' , $ response );
124124
125125 $ socket ->close ();
126126 }
127127
128128 public function testSecureHttpsOnRandomPort ()
129129 {
130- if (! function_exists ( ' stream_socket_enable_crypto ' )) {
131- $ this ->markTestSkipped ('Not supported on your platform (outdated HHVM?) ' );
130+ if (defined ( ' HHVM_VERSION ' )) {
131+ $ this ->markTestSkipped ('Not supported on HHVM ' );
132132 }
133133
134134 $ loop = Factory::create ();
@@ -154,16 +154,16 @@ public function testSecureHttpsOnRandomPort()
154154
155155 $ response = Block \await ($ result , $ loop , 1.0 );
156156
157- $ this ->assertContains ("HTTP/1.0 200 OK " , $ response );
158- $ this ->assertContains ('https:// ' . noScheme ($ socket ->getAddress ()) . '/ ' , $ response );
157+ $ this ->assertContainsString ("HTTP/1.0 200 OK " , $ response );
158+ $ this ->assertContainsString ('https:// ' . noScheme ($ socket ->getAddress ()) . '/ ' , $ response );
159159
160160 $ socket ->close ();
161161 }
162162
163163 public function testSecureHttpsReturnsData ()
164164 {
165- if (! function_exists ( ' stream_socket_enable_crypto ' )) {
166- $ this ->markTestSkipped ('Not supported on your platform (outdated HHVM?) ' );
165+ if (defined ( ' HHVM_VERSION ' )) {
166+ $ this ->markTestSkipped ('Not supported on HHVM ' );
167167 }
168168
169169 $ loop = Factory::create ();
@@ -194,17 +194,17 @@ public function testSecureHttpsReturnsData()
194194
195195 $ response = Block \await ($ result , $ loop , 1.0 );
196196
197- $ this ->assertContains ("HTTP/1.0 200 OK " , $ response );
198- $ this ->assertContains ("\r\nContent-Length: 33000 \r\n" , $ response );
197+ $ this ->assertContainsString ("HTTP/1.0 200 OK " , $ response );
198+ $ this ->assertContainsString ("\r\nContent-Length: 33000 \r\n" , $ response );
199199 $ this ->assertStringEndsWith ("\r\n" . str_repeat ('. ' , 33000 ), $ response );
200200
201201 $ socket ->close ();
202202 }
203203
204204 public function testSecureHttpsOnRandomPortWithoutHostHeaderUsesSocketUri ()
205205 {
206- if (! function_exists ( ' stream_socket_enable_crypto ' )) {
207- $ this ->markTestSkipped ('Not supported on your platform (outdated HHVM?) ' );
206+ if (defined ( ' HHVM_VERSION ' )) {
207+ $ this ->markTestSkipped ('Not supported on HHVM ' );
208208 }
209209
210210 $ loop = Factory::create ();
@@ -230,8 +230,8 @@ public function testSecureHttpsOnRandomPortWithoutHostHeaderUsesSocketUri()
230230
231231 $ response = Block \await ($ result , $ loop , 1.0 );
232232
233- $ this ->assertContains ("HTTP/1.0 200 OK " , $ response );
234- $ this ->assertContains ('https:// ' . noScheme ($ socket ->getAddress ()) . '/ ' , $ response );
233+ $ this ->assertContainsString ("HTTP/1.0 200 OK " , $ response );
234+ $ this ->assertContainsString ('https:// ' . noScheme ($ socket ->getAddress ()) . '/ ' , $ response );
235235
236236 $ socket ->close ();
237237 }
@@ -260,8 +260,8 @@ public function testPlainHttpOnStandardPortReturnsUriWithNoPort()
260260
261261 $ response = Block \await ($ result , $ loop , 1.0 );
262262
263- $ this ->assertContains ("HTTP/1.0 200 OK " , $ response );
264- $ this ->assertContains ('http://127.0.0.1/ ' , $ response );
263+ $ this ->assertContainsString ("HTTP/1.0 200 OK " , $ response );
264+ $ this ->assertContainsString ('http://127.0.0.1/ ' , $ response );
265265
266266 $ socket ->close ();
267267 }
@@ -290,8 +290,8 @@ public function testPlainHttpOnStandardPortWithoutHostHeaderReturnsUriWithNoPort
290290
291291 $ response = Block \await ($ result , $ loop , 1.0 );
292292
293- $ this ->assertContains ("HTTP/1.0 200 OK " , $ response );
294- $ this ->assertContains ('http://127.0.0.1/ ' , $ response );
293+ $ this ->assertContainsString ("HTTP/1.0 200 OK " , $ response );
294+ $ this ->assertContainsString ('http://127.0.0.1/ ' , $ response );
295295
296296 $ socket ->close ();
297297 }
@@ -329,8 +329,8 @@ public function testSecureHttpsOnStandardPortReturnsUriWithNoPort()
329329
330330 $ response = Block \await ($ result , $ loop , 1.0 );
331331
332- $ this ->assertContains ("HTTP/1.0 200 OK " , $ response );
333- $ this ->assertContains ('https://127.0.0.1/ ' , $ response );
332+ $ this ->assertContainsString ("HTTP/1.0 200 OK " , $ response );
333+ $ this ->assertContainsString ('https://127.0.0.1/ ' , $ response );
334334
335335 $ socket ->close ();
336336 }
@@ -368,8 +368,8 @@ public function testSecureHttpsOnStandardPortWithoutHostHeaderUsesSocketUri()
368368
369369 $ response = Block \await ($ result , $ loop , 1.0 );
370370
371- $ this ->assertContains ("HTTP/1.0 200 OK " , $ response );
372- $ this ->assertContains ('https://127.0.0.1/ ' , $ response );
371+ $ this ->assertContainsString ("HTTP/1.0 200 OK " , $ response );
372+ $ this ->assertContainsString ('https://127.0.0.1/ ' , $ response );
373373
374374 $ socket ->close ();
375375 }
@@ -398,8 +398,8 @@ public function testPlainHttpOnHttpsStandardPortReturnsUriWithPort()
398398
399399 $ response = Block \await ($ result , $ loop , 1.0 );
400400
401- $ this ->assertContains ("HTTP/1.0 200 OK " , $ response );
402- $ this ->assertContains ('http://127.0.0.1:443/ ' , $ response );
401+ $ this ->assertContainsString ("HTTP/1.0 200 OK " , $ response );
402+ $ this ->assertContainsString ('http://127.0.0.1:443/ ' , $ response );
403403
404404 $ socket ->close ();
405405 }
@@ -437,8 +437,8 @@ public function testSecureHttpsOnHttpStandardPortReturnsUriWithPort()
437437
438438 $ response = Block \await ($ result , $ loop , 1.0 );
439439
440- $ this ->assertContains ("HTTP/1.0 200 OK " , $ response );
441- $ this ->assertContains ('https://127.0.0.1:80/ ' , $ response );
440+ $ this ->assertContainsString ("HTTP/1.0 200 OK " , $ response );
441+ $ this ->assertContainsString ('https://127.0.0.1:80/ ' , $ response );
442442
443443 $ socket ->close ();
444444 }
@@ -784,7 +784,7 @@ function (ServerRequestInterface $request) {
784784 $ responses = Block \await (Promise \all ($ result ), $ loop , 1.0 );
785785
786786 foreach ($ responses as $ response ) {
787- $ this ->assertContains ("HTTP/1.0 200 OK " , $ response , $ response );
787+ $ this ->assertContainsString ("HTTP/1.0 200 OK " , $ response , $ response );
788788 $ this ->assertTrue (substr ($ response , -4 ) == 1024 , $ response );
789789 }
790790
0 commit comments