forked from xdebug/xdebug
-
-
Notifications
You must be signed in to change notification settings - Fork 36
/
bug00421.phpt
47 lines (38 loc) · 6.52 KB
/
bug00421.phpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
--TEST--
Test for bug #421: xdebug sends back invalid characters in xml sometimes
--FILE--
<?php
require 'dbgp/dbgpclient.php';
$data = file_get_contents( dirname(__FILE__) . '/bug00421.inc' );
$commands = array(
'step_into',
'feature_set -n max_depth -v 2',
'breakpoint_set -t line -n 25',
'run',
'context_get -c 0',
// 'property_get -n currentPageXML',
'detach'
);
dbgpRun( $data, $commands );
?>
--EXPECTF--
<?xml version="1.0" encoding="iso-8859-1"?>
<init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///tmp/xdebug-dbgp-test.php" language="PHP" protocol_version="1.0" appid="" idekey=""><engine version=""><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2%d by Derick Rethans]]></copyright></init>
-> step_into -i 1
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="1" status="break" reason="ok"><xdebug:message filename="file:///tmp/xdebug-dbgp-test.php" lineno="2"></xdebug:message></response>
-> feature_set -i 2 -n max_depth -v 2
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_depth" success="1"></response>
-> breakpoint_set -i 3 -t line -n 25
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="3" id=""></response>
-> run -i 4
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="4" status="break" reason="ok"><xdebug:message filename="file:///tmp/xdebug-dbgp-test.php" lineno="25"></xdebug:message></response>
-> context_get -i 5 -c 0
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="5" context="0"><property name="$currentPageXML" fullname="$currentPageXML" address="" type="object" classname="SimpleXMLIterator" children="1" numchildren="2" page="0" pagesize="32"><property name="@attributes" fullname="$currentPageXML->@attributes" facet="public" address="" type="array" children="1" numchildren="1" page="0" pagesize="32"><property name="name" fullname="$currentPageXML->@attributes['name']" address="" type="string" size="8" encoding="base64"><![CDATA[cHJvamVjdHM=]]></property></property><property name="page" fullname="$currentPageXML->page" facet="public" address="" type="array" children="1" numchildren="2" page="0" pagesize="32"><property name="0" fullname="$currentPageXML->page[0]" address="" type="object" classname="SimpleXMLIterator" children="1" numchildren="1"></property><property name="1" fullname="$currentPageXML->page[1]" address="" type="object" classname="SimpleXMLIterator" children="1" numchildren="1"></property></property></property><property name="$iterator" fullname="$iterator" address="" type="object" classname="SimpleXMLIterator" children="1" numchildren="1" page="0" pagesize="32"><property name="page" fullname="$iterator->page" facet="public" address="" type="object" classname="SimpleXMLIterator" children="1" numchildren="2" page="0" pagesize="32"><property name="@attributes" fullname="$iterator->page->@attributes" facet="public" address="" type="array" children="1" numchildren="1"></property><property name="page" fullname="$iterator->page->page" facet="public" address="" type="array" children="1" numchildren="2"></property></property></property><property name="$name" fullname="$name" type="uninitialized"></property><property name="$pageXML" fullname="$pageXML" address="" type="object" classname="SimpleXMLIterator" children="1" numchildren="2" page="0" pagesize="32"><property name="@attributes" fullname="$pageXML->@attributes" facet="public" address="" type="array" children="1" numchildren="1" page="0" pagesize="32"><property name="name" fullname="$pageXML->@attributes['name']" address="" type="string" size="8" encoding="base64"><![CDATA[cHJvamVjdHM=]]></property></property><property name="page" fullname="$pageXML->page" facet="public" address="" type="array" children="1" numchildren="2" page="0" pagesize="32"><property name="0" fullname="$pageXML->page[0]" address="" type="object" classname="SimpleXMLIterator" children="1" numchildren="1"></property><property name="1" fullname="$pageXML->page[1]" address="" type="object" classname="SimpleXMLIterator" children="1" numchildren="1"></property></property></property><property name="$projectsIterator" fullname="$projectsIterator" address="" type="array" children="1" numchildren="3" page="0" pagesize="32"><property name="0" fullname="$projectsIterator[0]" address="" type="object" classname="SimpleXMLIterator" children="1" numchildren="2" page="0" pagesize="32"><property name="@attributes" fullname="$projectsIterator[0]->@attributes" facet="public" address="" type="array" children="1" numchildren="1"></property><property name="page" fullname="$projectsIterator[0]->page" facet="public" address="" type="array" children="1" numchildren="2"></property></property><property name="1" fullname="$projectsIterator[1]" address="" type="object" classname="SimpleXMLIterator" children="1" numchildren="1" page="0" pagesize="32"><property name="@attributes" fullname="$projectsIterator[1]->@attributes" facet="public" address="" type="array" children="1" numchildren="1"></property></property><property name="2" fullname="$projectsIterator[2]" address="" type="object" classname="SimpleXMLIterator" children="1" numchildren="1" page="0" pagesize="32"><property name="@attributes" fullname="$projectsIterator[2]->@attributes" facet="public" address="" type="array" children="1" numchildren="1"></property></property></property><property name="$siteXMLString" fullname="$siteXMLString" address="" type="string" size="161" encoding="base64"><![CDATA[PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHNpdGU+CiAgICA8cGFnZSBuYW1lPSJwcm9qZWN0cyI+CiAgICAgICAgPHBhZ2UgbmFtZT0iUHJvamVjdCAxIiAvPgogICAgICAgIDxwYWdlIG5hbWU9IlByb2plY3QgMiIgLz4KICAgIDwvcGFnZT4KPC9zaXRlPgo=]]></property></response>
-> detach -i 6
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="detach" transaction_id="6" status="stopping" reason="ok"></response>