@@ -420,8 +420,10 @@ public function testEmitsErrorIfConnectionIsClosedBeforeHandshake()
420
420
421
421
$ error = Block \await ($ errorEvent , $ loop , self ::TIMEOUT );
422
422
423
+ // Connection from tcp://127.0.0.1:39528 failed during TLS handshake: Connection lost during TLS handshak
423
424
$ this ->assertTrue ($ error instanceof \RuntimeException);
424
- $ this ->assertEquals ('Connection lost during TLS handshake ' , $ error ->getMessage ());
425
+ $ this ->assertStringStartsWith ('Connection from tcp:// ' , $ error ->getMessage ());
426
+ $ this ->assertStringEndsWith ('failed during TLS handshake: Connection lost during TLS handshake ' , $ error ->getMessage ());
425
427
$ this ->assertEquals (defined ('SOCKET_ECONNRESET ' ) ? SOCKET_ECONNRESET : 0 , $ error ->getCode ());
426
428
}
427
429
@@ -445,8 +447,10 @@ public function testEmitsErrorIfConnectionIsClosedWithIncompleteHandshake()
445
447
446
448
$ error = Block \await ($ errorEvent , $ loop , self ::TIMEOUT );
447
449
450
+ // Connection from tcp://127.0.0.1:39528 failed during TLS handshake: Connection lost during TLS handshak
448
451
$ this ->assertTrue ($ error instanceof \RuntimeException);
449
- $ this ->assertEquals ('Connection lost during TLS handshake ' , $ error ->getMessage ());
452
+ $ this ->assertStringStartsWith ('Connection from tcp:// ' , $ error ->getMessage ());
453
+ $ this ->assertStringEndsWith ('failed during TLS handshake: Connection lost during TLS handshake ' , $ error ->getMessage ());
450
454
$ this ->assertEquals (defined ('SOCKET_ECONNRESET ' ) ? SOCKET_ECONNRESET : 0 , $ error ->getCode ());
451
455
}
452
456
0 commit comments