[xdebug-dev] xdebug xdebug/tests/bug00146.phpt

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Thu, 22 Sep 2005 20:47:00 +0200

Date: Thu Sep 22 20:47:00 CEST 2005
User: Derick Rethans
Directory: xdebug

Log Message:
- Added a test case for bug #146.

Added files:
           xdebug/tests/bug00146.phpt (new version: 1.1)

[FILE: /xdebug/tests/bug00146.phpt]

--TEST--
Test for bug #146: Array key names with quotes in traces are not escaped
--INI--
xdebug.enable=1
xdebug.auto_trace=0
xdebug.collect_params=1
xdebug.collect_return=1
xdebug.auto_profile=0
xdebug.profiler_enable=0
xdebug.show_mem_delta=0
xdebug.trace_format=0
--FILE--
<?php
        $tf = xdebug_start_trace('/tmp/'. uniqid('xdt', TRUE));

        function foo($a)
        {
                return $a;
        }

        $array = array("te\"st's" => 42);
        foo($array);

        echo file_get_contents($tf);
        unlink($tf);
?>
--EXPECTF--
TRACE START [%d-%d-%d %d:%d:%d]
    %f %d -> foo(array ('te"st\'s' => 42)) /%s/bug00146.php:10
>=> array ('te"st\'s' => 42)
    %f %d -> file_get_contents('/tmp/%s') /%s/bug00146.php:12
Received on Thu Sep 22 2005 - 20:47:08 BST

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST