|
| 1 | +--TEST-- |
| 2 | +Test for bug #2343: Virtual properties can not be shown safely |
| 3 | +--SKIPIF-- |
| 4 | +<?php |
| 5 | +require __DIR__ . '/../utils.inc'; |
| 6 | +check_reqs('PHP >= 8.4; dbgp'); |
| 7 | +?> |
| 8 | +--FILE-- |
| 9 | +<?php |
| 10 | +require 'dbgp/dbgpclient.php'; |
| 11 | +$filename = dirname(__FILE__) . '/bug02343.inc'; |
| 12 | + |
| 13 | +$commands = array( |
| 14 | + 'feature_set -n extended_properties -v 1', |
| 15 | + 'feature_set -n max_depth -v 2', |
| 16 | + "breakpoint_set -t line -f file://{$filename} -n 9", |
| 17 | + 'breakpoint_set -t exception -x *', |
| 18 | + 'run', |
| 19 | + 'context_get -c 0', |
| 20 | + 'step_into', |
| 21 | + 'context_get -c 0', |
| 22 | + 'detach', |
| 23 | +); |
| 24 | + |
| 25 | +dbgpRunFile( $filename, $commands ); |
| 26 | +?> |
| 27 | +--EXPECTF-- |
| 28 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 29 | +<init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file://bug02343.inc" 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> |
| 30 | + |
| 31 | +-> feature_set -i 1 -n extended_properties -v 1 |
| 32 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 33 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="extended_properties" success="1"></response> |
| 34 | + |
| 35 | +-> feature_set -i 2 -n max_depth -v 2 |
| 36 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 37 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_depth" success="1"></response> |
| 38 | + |
| 39 | +-> breakpoint_set -i 3 -t line -f file://bug02343.inc -n 9 |
| 40 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 41 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="3" id="{{PID}}0001"></response> |
| 42 | + |
| 43 | +-> breakpoint_set -i 4 -t exception -x * |
| 44 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 45 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="4" id="{{PID}}0002"></response> |
| 46 | + |
| 47 | +-> run -i 5 |
| 48 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 49 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="run" transaction_id="5" status="break" reason="ok"><xdebug:message filename="file://bug02343.inc" lineno="9"></xdebug:message></response> |
| 50 | + |
| 51 | +-> context_get -i 6 -c 0 |
| 52 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 53 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="6" context="0"><property type="object" children="0" numchildren="0" page="0" pagesize="32"><name encoding="base64"><![CDATA[JHRoaXM=]]></name><fullname encoding="base64"><![CDATA[JHRoaXM=]]></fullname><classname encoding="base64"><![CDATA[%s]]></classname></property></response> |
| 54 | + |
| 55 | +-> step_into -i 7 |
| 56 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 57 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="7" status="break" reason="ok"><xdebug:message filename="file://bug02343.inc" lineno="16"></xdebug:message></response> |
| 58 | + |
| 59 | +-> context_get -i 8 -c 0 |
| 60 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 61 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="8" context="0"><property type="object" children="0" numchildren="0" page="0" pagesize="32"><name encoding="base64"><![CDATA[JGV4YW1wbGU=]]></name><fullname encoding="base64"><![CDATA[JGV4YW1wbGU=]]></fullname><classname encoding="base64"><![CDATA[%s]]></classname></property></response> |
| 62 | + |
| 63 | +-> detach -i 9 |
| 64 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 65 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="detach" transaction_id="9" status="stopping" reason="ok"></response> |
0 commit comments