Skip to content

Commit d7ee56f

Browse files
committed
Set Xdebug's stack limit to 256 for legacy PHP
1 parent 1054cf6 commit d7ee56f

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

tests/FunctionalTest.php

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ public function setUpClientServer()
4444
/** @group internet */
4545
public function testConnection()
4646
{
47+
// max_nesting_level was set to 100 for PHP Versions < 5.4 which resulted in failing test for legacy PHP
48+
ini_set('xdebug.max_nesting_level', 256);
49+
4750
$this->assertResolveStream($this->client->connect('www.google.com:80'));
4851
}
4952

@@ -92,8 +95,8 @@ public function testConnectionSocks5()
9295
/** @group internet */
9396
public function testConnectionSocksOverTls()
9497
{
95-
if (!function_exists('stream_socket_enable_crypto')) {
96-
$this->markTestSkipped('Required function does not exist in your environment (HHVM?)');
98+
if (defined('HHVM_VERSION')) {
99+
$this->markTestSkipped('Not supported on HHVM');
97100
}
98101

99102
$socket = new \React\Socket\Server('tls://127.0.0.1:0', $this->loop, array('tls' => array(
@@ -117,8 +120,8 @@ public function testConnectionSocksOverTls()
117120
*/
118121
public function testConnectionSocksOverTlsUsesPeerNameFromSocksUri()
119122
{
120-
if (!function_exists('stream_socket_enable_crypto')) {
121-
$this->markTestSkipped('Required function does not exist in your environment (HHVM?)');
123+
if (defined('HHVM_VERSION')) {
124+
$this->markTestSkipped('Not supported on HHVM');
122125
}
123126

124127
$socket = new \React\Socket\Server('tls://127.0.0.1:0', $this->loop, array('tls' => array(
@@ -421,8 +424,8 @@ public function testConnectorInvalidUnboundPortTimeout()
421424
/** @group internet */
422425
public function testSecureConnectorOkay()
423426
{
424-
if (!function_exists('stream_socket_enable_crypto')) {
425-
$this->markTestSkipped('Required function does not exist in your environment (HHVM?)');
427+
if (defined('HHVM_VERSION')) {
428+
$this->markTestSkipped('Not supported on HHVM');
426429
}
427430

428431
$ssl = new SecureConnector($this->client, $this->loop);
@@ -445,8 +448,8 @@ public function testSecureConnectorToBadSslWithVerifyFails()
445448
/** @group internet */
446449
public function testSecureConnectorToBadSslWithoutVerifyWorks()
447450
{
448-
if (!function_exists('stream_socket_enable_crypto')) {
449-
$this->markTestSkipped('Required function does not exist in your environment (HHVM?)');
451+
if (defined('HHVM_VERSION')) {
452+
$this->markTestSkipped('Not supported on HHVM');
450453
}
451454

452455
$ssl = new SecureConnector($this->client, $this->loop, array('verify_peer' => false));

0 commit comments

Comments
 (0)