From 654f618bb333880b7c763aaad0e66c07f9138807 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Sun, 11 Nov 2018 11:29:15 -0200 Subject: [PATCH] Use dedicated assertInstanceOf assertion --- tests/FunctionalSecureServerTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/FunctionalSecureServerTest.php b/tests/FunctionalSecureServerTest.php index 72a79faa..9abc881d 100644 --- a/tests/FunctionalSecureServerTest.php +++ b/tests/FunctionalSecureServerTest.php @@ -421,7 +421,7 @@ public function testEmitsErrorIfConnectionIsClosedBeforeHandshake() $error = Block\await($errorEvent, $loop, self::TIMEOUT); // Connection from tcp://127.0.0.1:39528 failed during TLS handshake: Connection lost during TLS handshak - $this->assertTrue($error instanceof \RuntimeException); + $this->assertInstanceOf('RuntimeException', $error); $this->assertStringStartsWith('Connection from tcp://', $error->getMessage()); $this->assertStringEndsWith('failed during TLS handshake: Connection lost during TLS handshake', $error->getMessage()); $this->assertEquals(defined('SOCKET_ECONNRESET') ? SOCKET_ECONNRESET : 0, $error->getCode()); @@ -449,7 +449,7 @@ public function testEmitsErrorIfConnectionIsClosedWithIncompleteHandshake() $error = Block\await($errorEvent, $loop, self::TIMEOUT); // Connection from tcp://127.0.0.1:39528 failed during TLS handshake: Connection lost during TLS handshak - $this->assertTrue($error instanceof \RuntimeException); + $this->assertInstanceOf('RuntimeException', $error); $this->assertStringStartsWith('Connection from tcp://', $error->getMessage()); $this->assertStringEndsWith('failed during TLS handshake: Connection lost during TLS handshake', $error->getMessage()); $this->assertEquals(defined('SOCKET_ECONNRESET') ? SOCKET_ECONNRESET : 0, $error->getCode()); @@ -494,7 +494,7 @@ public function testEmitsErrorIfConnectionIsHttpInsteadOfSecureHandshake() $error = Block\await($errorEvent, $loop, self::TIMEOUT); - $this->assertTrue($error instanceof \RuntimeException); + $this->assertInstanceOf('RuntimeException', $error); // OpenSSL error messages are version/platform specific // Unable to complete TLS handshake: SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:SSL3_GET_RECORD:http request @@ -523,7 +523,7 @@ public function testEmitsErrorIfConnectionIsUnknownProtocolInsteadOfSecureHandsh $error = Block\await($errorEvent, $loop, self::TIMEOUT); - $this->assertTrue($error instanceof \RuntimeException); + $this->assertInstanceOf('RuntimeException', $error); // OpenSSL error messages are version/platform specific // Unable to complete TLS handshake: SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:SSL3_GET_RECORD:unknown protocol