|
| 1 | +--TEST-- |
| 2 | +Test for bug #2371: Lazy proxy objects are initialised correctly |
| 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__) . '/bug02371-003.inc'; |
| 12 | + |
| 13 | +$commands = array( |
| 14 | + "breakpoint_set -t line -f file://{$filename} -n 18", |
| 15 | + "breakpoint_set -t line -f file://{$filename} -n 20", |
| 16 | + 'run', |
| 17 | + 'property_get -n $user', |
| 18 | + 'run', |
| 19 | + 'property_get -n $user', |
| 20 | + 'detach', |
| 21 | +); |
| 22 | + |
| 23 | +dbgpRunFile( $filename, $commands ); |
| 24 | +?> |
| 25 | +--EXPECTF-- |
| 26 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 27 | +<init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file://bug02371-003.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> |
| 28 | + |
| 29 | +-> breakpoint_set -i 1 -t line -f file://bug02371-003.inc -n 18 |
| 30 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 31 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="1" id="{{PID}}0001"></response> |
| 32 | + |
| 33 | +-> breakpoint_set -i 2 -t line -f file://bug02371-003.inc -n 20 |
| 34 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 35 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="2" id="{{PID}}0002"></response> |
| 36 | + |
| 37 | +-> run -i 3 |
| 38 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 39 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="run" transaction_id="3" status="break" reason="ok"><xdebug:message filename="file://bug02371-003.inc" lineno="18"></xdebug:message></response> |
| 40 | + |
| 41 | +-> property_get -i 4 -n $user |
| 42 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 43 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="4"><property name="$user" fullname="$user" type="object" facet="lazy-proxy" type="object" classname="User" children="1" numchildren="2" page="0" pagesize="32"><property name="id" fullname="$user->id" facet="public" type="int"><![CDATA[43]]></property><property name="name" fullname="$user->name" facet="public" type="string" size="5" encoding="base64"><![CDATA[Qmx1ZXk=]]></property></property></response> |
| 44 | + |
| 45 | +-> run -i 5 |
| 46 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 47 | +<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://bug02371-003.inc" lineno="20"></xdebug:message></response> |
| 48 | + |
| 49 | +-> property_get -i 6 -n $user |
| 50 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 51 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="6"><property name="$user" fullname="$user" type="object" facet="lazy-proxy" type="object" classname="User" children="1" numchildren="2" page="0" pagesize="32"><property name="id" fullname="$user->id" facet="public" type="int"><![CDATA[43]]></property><property name="name" fullname="$user->name" facet="public" type="string" size="5" encoding="base64"><![CDATA[Qmx1ZXk=]]></property></property></response> |
| 52 | + |
| 53 | +-> detach -i 7 |
| 54 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 55 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="detach" transaction_id="7" status="stopping" reason="ok"></response> |
0 commit comments