Skip to content

Commit 5ae5a1e

Browse files
committed
Skip SSL/TLS tests if required function does not exist (HHVM)
1 parent 0fb18c6 commit 5ae5a1e

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/FunctionalTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,21 @@ public function testConnectorInvalidUnboundPortTimeout()
123123

124124
public function testSecureConnectorOkay()
125125
{
126+
if (!function_exists('stream_socket_enable_crypto')) {
127+
$this->markTestSkipped('Required function does not exist in your environment (HHVM?)');
128+
}
129+
126130
$ssl = $this->client->createSecureConnector();
127131

128132
$this->assertResolveStream($ssl->create('www.google.com', 443));
129133
}
130134

131135
public function testSecureConnectorInvalidPlaintextIsNotSsl()
132136
{
137+
if (!function_exists('stream_socket_enable_crypto')) {
138+
$this->markTestSkipped('Required function does not exist in your environment (HHVM?)');
139+
}
140+
133141
$ssl = $this->client->createSecureConnector();
134142

135143
$this->assertRejectPromise($ssl->create('www.google.com', 80));

0 commit comments

Comments
 (0)