@@ -248,9 +248,11 @@ public function testSSLConnectionParameters()
248248 $ this ->assertArrayHasKey (6 , $ instance ->constructParams );
249249 $ options = $ instance ->constructParams [6 ];
250250 $ this ->assertArrayHasKey ('ssl_context ' , $ options );
251- $ context = $ options ['ssl_context ' ];
251+ $ this ->assertArrayHasKey ('context ' , $ options );
252+ $ context = $ options ['context ' ];
252253 // unset to check whole array at once later
253254 $ instance ->constructParams [6 ]['ssl_context ' ] = null ;
255+ $ instance ->constructParams [6 ]['context ' ] = null ;
254256 $ this ->assertIsResource ($ context );
255257 $ this ->assertEquals ('stream-context ' , get_resource_type ($ context ));
256258 $ options = stream_context_get_options ($ context );
@@ -272,6 +274,7 @@ public function testSSLConnectionParameters()
272274 'connection_timeout ' => 3 ,
273275 'read_write_timeout ' => 3 ,
274276 'ssl_context ' => null , // context checked earlier
277+ 'context ' => null , // context checked earlier
275278 'keepalive ' => false ,
276279 'heartbeat ' => 0 ,
277280 ]
@@ -455,9 +458,11 @@ public function testSSLClusterConnectionParameters()
455458 $ this ->assertArrayHasKey (6 , $ instance ->constructParams );
456459 $ options = $ instance ->constructParams [6 ];
457460 $ this ->assertArrayHasKey ('ssl_context ' , $ options );
458- $ context = $ options ['ssl_context ' ];
461+ $ this ->assertArrayHasKey ('context ' , $ options );
462+ $ context = $ options ['context ' ];
459463 // unset to check whole array at once later
460464 $ instance ->constructParams [6 ]['ssl_context ' ] = null ;
465+ $ instance ->constructParams [6 ]['context ' ] = null ;
461466 $ this ->assertIsResource ($ context );
462467 $ this ->assertEquals ('stream-context ' , get_resource_type ($ context ));
463468 $ options = stream_context_get_options ($ context );
@@ -466,9 +471,10 @@ public function testSSLClusterConnectionParameters()
466471 $ this ->assertArrayHasKey (1 , $ instance ::$ createConnectionParams );
467472 $ createConnectionOptions = $ instance ::$ createConnectionParams [1 ];
468473 $ this ->assertArrayHasKey ('ssl_context ' , $ createConnectionOptions );
469- $ createConnectionContext = $ createConnectionOptions ['ssl_context ' ];
474+ $ createConnectionContext = $ createConnectionOptions ['context ' ];
470475 // unset to check whole array at once later
471476 $ instance ::$ createConnectionParams [1 ]['ssl_context ' ] = null ;
477+ $ instance ::$ createConnectionParams [1 ]['context ' ] = null ;
472478 $ this ->assertIsResource ($ createConnectionContext );
473479 $ this ->assertEquals ('stream-context ' , get_resource_type ($ createConnectionContext ));
474480 $ createConnectionOptions = stream_context_get_options ($ createConnectionContext );
@@ -491,6 +497,7 @@ public function testSSLClusterConnectionParameters()
491497 'connection_timeout ' => 3 ,
492498 'read_write_timeout ' => 3 ,
493499 'ssl_context ' => null ,
500+ 'context ' => null ,
494501 'keepalive ' => false ,
495502 'heartbeat ' => 0 ,
496503 ]
@@ -524,6 +531,7 @@ public function testSSLClusterConnectionParameters()
524531 'connection_timeout ' => 3 ,
525532 'read_write_timeout ' => 3 ,
526533 'ssl_context ' => null , // context checked earlier
534+ 'context ' => null , // context checked earlier
527535 'keepalive ' => false ,
528536 'heartbeat ' => 0
529537 ]
0 commit comments