File: bug00998-ipv6_localhost.phpt

package info (click to toggle)
xdebug 3.4.5-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,096 kB
  • sloc: ansic: 19,944; php: 6,217; xml: 4,172; pascal: 534; makefile: 4; sh: 2
file content (19 lines) | stat: -rw-r--r-- 1,089 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--TEST--
Test for bug #998: Test that Xdebug connects back on IPv6 with localhost as the remote host
--SKIPIF--
<?php
require __DIR__ . '/../utils.inc';
check_reqs('dbgp');
if (getenv("SKIP_IPV6_TESTS")) { exit("skip Excluding IPv6 tests"); }
require 'dbgp/dbgpclient.php';
if (!DebugClientIPv6::isSupported($errno, $errstr)) echo "skip IPv6 support is not configured. Error: $errstr, errno: $errno\n";
if (strstr(exec("getent ahostsv6 localhost"), '::1')===false) echo "skip localhost doesn't resolve as IPv6";
?>
--FILE--
<?php
require 'dbgp/dbgpclient.php';
dbgpRunFile('', [], [ 'xdebug.remote_host' => 'localhost' ], [ 'ipv' => 6 ] );
?>
--EXPECT--
<?xml version="1.0" encoding="iso-8859-1"?>
<init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file://" language="PHP" xdebug:language_version="" protocol_version="1.0" appid=""><engine version=""><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2099 by Derick Rethans]]></copyright></init>