Skip to content

Commit

Permalink
- Get rid of ZE1 tests
Browse files Browse the repository at this point in the history
- Merge test fixes from trunk to the 2.1 branch

SVN Rev: 3362
  • Loading branch information
derickr committed Nov 3, 2010
1 parent 02cb367 commit 5263931
Show file tree
Hide file tree
Showing 54 changed files with 168 additions and 764 deletions.
3 changes: 0 additions & 3 deletions tests/array_map.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,5 @@ unlink($tf);
array
TRACE START [%d-%d-%d %d:%d:%d]
%w%f %w%d -> array_map('strlen', array (0 => 'a', 1 => 'bb', 2 => 'ccc')) /%s/array_map.php:5
%w%f %w%d -> strlen('a') /%s/array_map.php:0
%w%f %w%d -> strlen('bb') /%s/array_map.php:0
%w%f %w%d -> strlen('ccc') /%s/array_map.php:0
%w%f %w%d -> gettype(array (0 => 1, 1 => 2, 2 => 3)) /%s/array_map.php:7
%w%f %w%d -> file_get_contents('/tmp/%s') /%s/array_map.php:9
2 changes: 1 addition & 1 deletion tests/assignment-trace1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_returns=0
xdebug.collect_return=0
xdebug.collect_assignments=1
--FILE--
<?php
Expand Down
3 changes: 2 additions & 1 deletion tests/assignment-trace2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.collect_vars=1
xdebug.collect_params=3
xdebug.collect_returns=0
xdebug.collect_return=0
xdebug.collect_assignments=1
xdebug.dump.GET=
--FILE--
<?php
$tf = xdebug_start_trace('/tmp/'. uniqid('xdt', TRUE));
Expand Down
3 changes: 2 additions & 1 deletion tests/assignment-trace3.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.collect_vars=1
xdebug.collect_params=3
xdebug.collect_returns=0
xdebug.collect_return=0
xdebug.collect_assignments=1
xdebug.dump.GET=
--FILE--
<?php
$tf = xdebug_start_trace('/tmp/'. uniqid('xdt', TRUE));
Expand Down
3 changes: 2 additions & 1 deletion tests/assignment-trace4.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.collect_vars=1
xdebug.collect_params=3
xdebug.collect_returns=0
xdebug.collect_return=0
xdebug.collect_assignments=1
xdebug.dump.GET=
--FILE--
<?php
$tf = xdebug_start_trace('/tmp/'. uniqid('xdt', TRUE));
Expand Down
2 changes: 1 addition & 1 deletion tests/assignment-trace5.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.collect_vars=1
xdebug.collect_params=3
xdebug.collect_returns=0
xdebug.collect_return=0
xdebug.collect_assignments=1
--FILE--
<?php
Expand Down
2 changes: 1 addition & 1 deletion tests/assignment-trace6.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.collect_vars=1
xdebug.collect_params=3
xdebug.collect_returns=0
xdebug.collect_return=0
xdebug.collect_assignments=1
--FILE--
<?php
Expand Down
2 changes: 1 addition & 1 deletion tests/assignment-trace7.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_returns=0
xdebug.collect_return=0
xdebug.collect_assignments=1
--FILE--
<?php
Expand Down
2 changes: 1 addition & 1 deletion tests/assignment-trace8-php52.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_returns=0
xdebug.collect_return=0
xdebug.collect_assignments=1
xdebug.var_display_max_depth=9
--FILE--
Expand Down
2 changes: 1 addition & 1 deletion tests/assignment-trace8.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_returns=0
xdebug.collect_return=0
xdebug.collect_assignments=1
xdebug.var_display_max_depth=9
--FILE--
Expand Down
2 changes: 1 addition & 1 deletion tests/assignment-trace9-php52.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_returns=0
xdebug.collect_return=0
xdebug.collect_assignments=1
xdebug.var_display_max_depth=9
--FILE--
Expand Down
2 changes: 1 addition & 1 deletion tests/assignment-trace9.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_returns=0
xdebug.collect_return=0
xdebug.collect_assignments=1
xdebug.var_display_max_depth=9
--FILE--
Expand Down
2 changes: 1 addition & 1 deletion tests/bug00146.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ xdebug.trace_format=0
}

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

echo file_get_contents($tf);
unlink($tf);
Expand Down
6 changes: 3 additions & 3 deletions tests/bug00241.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ array(5) {
["errno"]=>
string(1) "8"
["string"]=>
string(22) "'Undefined index: FOO'"
string(2%d) "'Undefined index:%sFOO'"
["file"]=>
string(%d) "'%sbug00241.php'"
["line"]=>
string(2) "32"
["context"]=>
string(%d) "array ('GLOBALS' => ..., '_ENV' => array ('%s' => '%s', '%s' => '%s', ...), ...)"
string(%d) "array (%s)"
}
}
[2]=>
Expand All @@ -96,7 +96,7 @@ array(5) {
["params"]=>
array(1) {
["errno"]=>
string(4) "NULL"
string(%d) "%s
}
}
[3]=>
Expand Down
18 changes: 10 additions & 8 deletions tests/bug00334.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,13 @@ xdebug.trace_format=0
xdebug_start_code_coverage(XDEBUG_CC_DEAD_CODE | XDEBUG_CC_UNUSED);
// MUST be both code coverage options to cause problems
include(dirname(__FILE__).'/bug00334.inc'); // File with problem in it.
var_dump(xdebug_get_code_coverage());
$c = xdebug_get_code_coverage();
ksort($c);
var_dump($c);
xdebug_stop_code_coverage();
?>
--EXPECTF--
array(2) {
["%sbug00334.php"]=>
array(2) {
[5]=>
int(1)
[6]=>
int(1)
}
["%sbug00334.inc"]=>
array(3) {
[5]=>
Expand All @@ -35,4 +30,11 @@ array(2) {
[9]=>
int(1)
}
["%sbug00334.php"]=>
array(2) {
[5]=>
int(1)
[6]=>
int(1)
}
}
1 change: 1 addition & 0 deletions tests/bug00340.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Test for bug #340: Segfault while throwing an Exception
xdebug.default_enable=1
html_errors=1
xdebug.file_link_format=
xdebug.dump.GET=
--FILE--
<?php
class MyException extends Exception
Expand Down
2 changes: 1 addition & 1 deletion tests/bug00355.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ unlink($tf);
?>
--EXPECTF--
Hi2
Version: 2.1%s
Version: 2.%d%s
File format: 2
TRACE START [%s]
2 2 1 %f %d
Expand Down
1 change: 1 addition & 0 deletions tests/bug00389.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Test for bug #389: Destructors called on fatal error
--INI--
log_errors=0
xdebug.default_enable=1
xdebug.dump.GET=
--FILE--
<?php
class Food {
Expand Down
2 changes: 2 additions & 0 deletions tests/bug00391.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Test for bug #391: When PHP runs with Xdebug it doesn't stop executing script wh
--INI--
log_errors=0
xdebug.default_enable=1
xdebug.dump.GET=
xdebug.collect_params=0
--FILE--
<?php

Expand Down
22 changes: 22 additions & 0 deletions tests/bug00421.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
function iterateXML()
{
$siteXMLString = file_get_contents( FILE, true);
$iterator = new SimpleXMLIterator($siteXMLString);
$projectsIterator = $iterator->xpath("//page");

// Iterate through all 3 occurances of <page> elements
foreach ($projectsIterator as $pageXML)
{
// Set a breakpoint somewhere inside this loop.
// You won't see any variables in the Local Variables panel until the second
// time through the loop. After that, they seem to work fine.
$currentPageXML= $pageXML;
$name = $currentPageXML["name"];
echo $name . '
';
}
}

iterateXML();

25 changes: 1 addition & 24 deletions tests/bug00421.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,7 @@ require 'dbgp/dbgpclient.php';

$file = dirname(__FILE__) . "/localvariables.xml";

$data = <<<'NOWDOC'
<?php
function iterateXML()
{
$siteXMLString = file_get_contents( FILE, true);
$iterator = new SimpleXMLIterator($siteXMLString);
$projectsIterator = $iterator->xpath("//page");
// Iterate through all 3 occurances of <page> elements
foreach ($projectsIterator as $pageXML)
{
// Set a breakpoint somewhere inside this loop.
// You won't see any variables in the Local Variables panel until the second
// time through the loop. After that, they seem to work fine.
$currentPageXML= $pageXML;
$name = $currentPageXML["name"];
echo $name . '
';
}
}
iterateXML();

NOWDOC;
$data = file_get_contents( dirname(__FILE__) . '/bug00421.inc' );

$commands = array(
'step_into',
Expand Down
8 changes: 4 additions & 4 deletions tests/bug00470.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ xdebug.extended_info=1

include 'bug00470.inc';
$cc = xdebug_get_code_coverage();
array_shift($cc);
var_dump($cc);
ksort($cc);
var_dump(array_slice($cc, 0, 1));

new Ticket842;
$cc = xdebug_get_code_coverage();
array_shift($cc);
var_dump($cc);
ksort($cc);
var_dump(array_slice($cc, 0, 1));

xdebug_stop_code_coverage(false);
?>
Expand Down
4 changes: 2 additions & 2 deletions tests/bug00472.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ xdebug.extended_info=1

include 'bug00472.inc';
$cc = xdebug_get_code_coverage();
array_shift($cc);
var_dump($cc);
ksort($cc);
var_dump(array_slice($cc, 0, 1));

xdebug_stop_code_coverage(false);
?>
Expand Down
6 changes: 3 additions & 3 deletions tests/bug00475.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ Test for bug #475: Property names with null chars are not sent fully to the clie
--FILE--
<?php
require 'dbgp/dbgpclient.php';
$data = <<<'NOWDOC'
$data = <<<NOWDOC
<?php
$a = array( "example\0key" => "Value", "example" => "value\0key" );
var_dump( $a );
\$a = array( "example\0key" => "Value", "example" => "value\0key" );
var_dump( \$a );
NOWDOC;

$commands = array(
Expand Down
1 change: 1 addition & 0 deletions tests/bug00476-2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Test for bug #476: Exception chanining doesn't work
<?php if(version_compare(phpversion(), "5.3.0", '<')) echo "skip PHP 5.3 needed\n"; ?>
--INI--
xdebug.default_enable=1
xdebug.dump.GET=
--FILE--
<?php

Expand Down
1 change: 1 addition & 0 deletions tests/bug00476.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Test for bug #476: Exception chanining doesn't work
<?php if(version_compare(phpversion(), "5.3.0", '<')) echo "skip PHP 5.3 needed\n"; ?>
--INI--
xdebug.default_enable=1
xdebug.dump.GET=
--FILE--
<?php
try {
Expand Down
18 changes: 18 additions & 0 deletions tests/bug00494.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
class abc {
private $arr;
public function abc(){
$this->arr = array(
0 => array("some", "values"),
1 => array("some", "more", "values")
);
}
}

class def extends abc {
private $arr;
}

$o = new def;
echo "o: ";
var_dump($o);
21 changes: 1 addition & 20 deletions tests/bug00494.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,7 @@ Test for bug #494: Private attributes of parent class unavailable when inheritin
--FILE--
<?php
require 'dbgp/dbgpclient.php';
$data = <<<'NOWDOC'
<?php
class abc {
private $arr;
public function abc(){
$this->arr = array(
0 => array("some", "values"),
1 => array("some", "more", "values")
);
}
}
class def extends abc {
private $arr;
}
$o = new def;
echo "o: ";
var_dump($o);
NOWDOC;
$data = file_get_contents(dirname(__FILE__) . '/bug00494.inc');

$commands = array(
'step_into',
Expand Down
4 changes: 2 additions & 2 deletions tests/bug00515.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ xdebug.extended_info=1

include 'bug00515.inc';
$cc = xdebug_get_code_coverage();
array_shift($cc);
var_dump($cc);
ksort($cc);
var_dump(array_slice($cc, 0, 1));

xdebug_stop_code_coverage(false);
?>
Expand Down
Loading

0 comments on commit 5263931

Please sign in to comment.