Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dedicated assertInstanceOf assertion #181

Merged
merged 1 commit into from
Dec 29, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/FunctionalSecureServerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down