Skip to content

Commit 8e2f1d7

Browse files
committed
Skip all TLS tests on legacy HHVM
1 parent c9485dd commit 8e2f1d7

File tree

6 files changed

+21
-18
lines changed

6 files changed

+21
-18
lines changed

tests/FunctionalSecureServerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class FunctionalSecureServerTest extends TestCase
1919

2020
public function setUp()
2121
{
22-
if (!function_exists('stream_socket_enable_crypto')) {
23-
$this->markTestSkipped('Not supported on your platform (outdated HHVM?)');
22+
if (defined('HHVM_VERSION')) {
23+
$this->markTestSkipped('Not supported on legacy HHVM');
2424
}
2525
}
2626

tests/IntegrationTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ public function gettingStuffFromGoogleShouldWork()
3636
/** @test */
3737
public function gettingEncryptedStuffFromGoogleShouldWork()
3838
{
39-
if (!function_exists('stream_socket_enable_crypto')) {
40-
$this->markTestSkipped('Not supported on your platform (outdated HHVM?)');
39+
if (defined('HHVM_VERSION')) {
40+
$this->markTestSkipped('Not supported on legacy HHVM');
4141
}
4242

4343
$loop = Factory::create();
@@ -55,8 +55,8 @@ public function gettingEncryptedStuffFromGoogleShouldWork()
5555
/** @test */
5656
public function gettingEncryptedStuffFromGoogleShouldWorkIfHostIsResolvedFirst()
5757
{
58-
if (!function_exists('stream_socket_enable_crypto')) {
59-
$this->markTestSkipped('Not supported on your platform (outdated HHVM?)');
58+
if (defined('HHVM_VERSION')) {
59+
$this->markTestSkipped('Not supported on legacy HHVM');
6060
}
6161

6262
$loop = Factory::create();
@@ -363,8 +363,8 @@ public function testConnectingFailsIfTimeoutIsTooSmall()
363363

364364
public function testSelfSignedRejectsIfVerificationIsEnabled()
365365
{
366-
if (!function_exists('stream_socket_enable_crypto')) {
367-
$this->markTestSkipped('Not supported on your platform (outdated HHVM?)');
366+
if (defined('HHVM_VERSION')) {
367+
$this->markTestSkipped('Not supported on legacy HHVM');
368368
}
369369

370370
$loop = Factory::create();
@@ -381,8 +381,8 @@ public function testSelfSignedRejectsIfVerificationIsEnabled()
381381

382382
public function testSelfSignedResolvesIfVerificationIsDisabled()
383383
{
384-
if (!function_exists('stream_socket_enable_crypto')) {
385-
$this->markTestSkipped('Not supported on your platform (outdated HHVM?)');
384+
if (defined('HHVM_VERSION')) {
385+
$this->markTestSkipped('Not supported on legacy HHVM');
386386
}
387387

388388
$loop = Factory::create();

tests/SecureConnectorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ class SecureConnectorTest extends TestCase
1414

1515
public function setUp()
1616
{
17-
if (!function_exists('stream_socket_enable_crypto')) {
18-
$this->markTestSkipped('Not supported on your platform (outdated HHVM?)');
17+
if (defined('HHVM_VERSION')) {
18+
$this->markTestSkipped('Not supported on legacy HHVM');
1919
}
2020

2121
$this->loop = $this->getMockBuilder('React\EventLoop\LoopInterface')->getMock();

tests/SecureIntegrationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class SecureIntegrationTest extends TestCase
2424

2525
public function setUp()
2626
{
27-
if (!function_exists('stream_socket_enable_crypto')) {
28-
$this->markTestSkipped('Not supported on your platform (outdated HHVM?)');
27+
if (defined('HHVM_VERSION')) {
28+
$this->markTestSkipped('Not supported on legacy HHVM');
2929
}
3030

3131
$this->loop = LoopFactory::create();

tests/SecureServerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ class SecureServerTest extends TestCase
1010
{
1111
public function setUp()
1212
{
13-
if (!function_exists('stream_socket_enable_crypto')) {
14-
$this->markTestSkipped('Not supported on your platform (outdated HHVM?)');
13+
if (defined('HHVM_VERSION')) {
14+
$this->markTestSkipped('Not supported on legacy HHVM');
1515
}
1616
}
1717

tests/ServerTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ public function testConstructorCreatesExpectedTcpServer()
5151

5252
public function testConstructorCreatesExpectedUnixServer()
5353
{
54+
if (defined('HHVM_VERSION')) {
55+
$this->markTestSkipped('Not supported on legacy HHVM');
56+
}
5457
if (!in_array('unix', stream_get_transports())) {
5558
$this->markTestSkipped('Unix domain sockets (UDS) not supported on your platform (Windows?)');
5659
}
@@ -182,8 +185,8 @@ public function testEmitsConnectionWithInheritedContextOptions()
182185

183186
public function testDoesNotEmitSecureConnectionForNewPlaintextConnectionThatIsIdle()
184187
{
185-
if (!function_exists('stream_socket_enable_crypto')) {
186-
$this->markTestSkipped('Not supported on your platform (outdated HHVM?)');
188+
if (defined('HHVM_VERSION')) {
189+
$this->markTestSkipped('Not supported on legacy HHVM');
187190
}
188191

189192
$loop = Factory::create();

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy