summaryrefslogtreecommitdiff
path: root/ext/sockets/tests
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2017-03-11 00:33:32 +0100
committerJoe Watkins <krakjoe@php.net>2017-03-12 18:58:50 +0000
commitb3ca0c25003e5e9279159aa2e6460b25908332c4 (patch)
treeb47666ad94b030fe31820d3e4f325788f5ae1a5f /ext/sockets/tests
parentea91c082328c6f93f20a078896c16c2051061f47 (diff)
downloadphp-git-b3ca0c25003e5e9279159aa2e6460b25908332c4.tar.gz
zend-test extension to house code that is required for testing internal APIs, but that we would not want to expose for regular builds
Diffstat (limited to 'ext/sockets/tests')
-rw-r--r--ext/sockets/tests/socket_export_stream-5.phpt6
-rw-r--r--ext/sockets/tests/socket_import_stream-5.phpt6
2 files changed, 6 insertions, 6 deletions
diff --git a/ext/sockets/tests/socket_export_stream-5.phpt b/ext/sockets/tests/socket_export_stream-5.phpt
index 732b2072d0..db2d018d47 100644
--- a/ext/sockets/tests/socket_export_stream-5.phpt
+++ b/ext/sockets/tests/socket_export_stream-5.phpt
@@ -5,7 +5,7 @@ socket_export_stream: effects of leaked handles
if (!extension_loaded('sockets')) {
die('SKIP sockets extension not available.');
}
-if (!function_exists('leak_variable'))
+if (!function_exists('zend_leak_variable'))
die('SKIP only for debug builds');
--FILE--
<?php
@@ -13,12 +13,12 @@ if (!function_exists('leak_variable'))
$sock0 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
socket_bind($sock0, '0.0.0.0', 58380);
$stream0 = socket_export_stream($sock0);
-leak_variable($stream0, true);
+zend_leak_variable($stream0);
$sock1 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
socket_bind($sock1, '0.0.0.0', 58381);
$stream1 = socket_export_stream($sock1);
-leak_variable($sock1, true);
+zend_leak_variable($sock1);
echo "Done.\n";
--EXPECT--
diff --git a/ext/sockets/tests/socket_import_stream-5.phpt b/ext/sockets/tests/socket_import_stream-5.phpt
index d48531e410..0583f2e4c2 100644
--- a/ext/sockets/tests/socket_import_stream-5.phpt
+++ b/ext/sockets/tests/socket_import_stream-5.phpt
@@ -5,18 +5,18 @@ socket_import_stream: effects of leaked handles
if (!extension_loaded('sockets')) {
die('SKIP sockets extension not available.');
}
-if (!function_exists('leak_variable'))
+if (!function_exists('zend_leak_variable'))
die('SKIP only for debug builds');
--FILE--
<?php
$stream0 = stream_socket_server("udp://0.0.0.0:58380", $errno, $errstr, STREAM_SERVER_BIND);
$sock0 = socket_import_stream($stream0);
-leak_variable($stream0, true);
+zend_leak_variable($stream0);
$stream1 = stream_socket_server("udp://0.0.0.0:58381", $errno, $errstr, STREAM_SERVER_BIND);
$sock1 = socket_import_stream($stream1);
-leak_variable($sock1, true);
+zend_leak_variable($sock1);
echo "Done.\n";
--EXPECT--