mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Remove some zpp failure tests
These tests exclusively check zpp failure conditions, so drop them.
This commit is contained in:
parent
1133ee1167
commit
002c096871
13 changed files with 0 additions and 344 deletions
|
@ -1,30 +0,0 @@
|
|||
--TEST--
|
||||
Testing Exception's methods
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$x = new Exception;
|
||||
$x->gettraceasstring(1);
|
||||
$x->gettraceasstring();
|
||||
$x->__tostring(1);
|
||||
$x->gettrace(1);
|
||||
$x->getline(1);
|
||||
$x->getfile(1);
|
||||
$x->getmessage(1);
|
||||
$x->getcode(1);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Exception::getTraceAsString() expects exactly 0 parameters, 1 given in %s on line %d
|
||||
|
||||
Warning: Exception::__toString() expects exactly 0 parameters, 1 given in %s on line %d
|
||||
|
||||
Warning: Exception::getTrace() expects exactly 0 parameters, 1 given in %s on line %d
|
||||
|
||||
Warning: Exception::getLine() expects exactly 0 parameters, 1 given in %s on line %d
|
||||
|
||||
Warning: Exception::getFile() expects exactly 0 parameters, 1 given in %s on line %d
|
||||
|
||||
Warning: Exception::getMessage() expects exactly 0 parameters, 1 given in %s on line %d
|
||||
|
||||
Warning: Exception::getCode() expects exactly 0 parameters, 1 given in %s on line %d
|
|
@ -1,35 +0,0 @@
|
|||
--TEST--
|
||||
Test function_exists() function : error conditions
|
||||
--FILE--
|
||||
<?php
|
||||
/*
|
||||
* proto bool function_exists(string function_name)
|
||||
* Function is implemented in Zend/zend_builtin_functions.c
|
||||
*/
|
||||
|
||||
echo "*** Testing function_exists() : error conditions ***\n";
|
||||
|
||||
$arg_0 = "ABC";
|
||||
$extra_arg = 1;
|
||||
|
||||
echo "\nToo many arguments\n";
|
||||
var_dump(function_exists($arg_0, $extra_arg));
|
||||
|
||||
echo "\nToo few arguments\n";
|
||||
var_dump(function_exists());
|
||||
|
||||
?>
|
||||
===Done===
|
||||
--EXPECTF--
|
||||
*** Testing function_exists() : error conditions ***
|
||||
|
||||
Too many arguments
|
||||
|
||||
Warning: function_exists() expects exactly 1 parameter, 2 given in %s on line %d
|
||||
NULL
|
||||
|
||||
Too few arguments
|
||||
|
||||
Warning: function_exists() expects exactly 1 parameter, 0 given in %s on line %d
|
||||
NULL
|
||||
===Done===
|
|
@ -1,29 +0,0 @@
|
|||
--TEST--
|
||||
Test get_defined_functions() function : error conditions
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/* Prototype : array get_defined_functions ( $exclude_disabled = false )
|
||||
* Description: Gets an array of all defined functions.
|
||||
* Source code: Zend/zend_builtin_functions.c
|
||||
*/
|
||||
|
||||
|
||||
echo "*** Testing get_defined_functions() : error conditions ***\n";
|
||||
|
||||
|
||||
echo "\n-- Testing get_defined_functions() function with more than expected no. of arguments --\n";
|
||||
$extra_arg = 10;
|
||||
$extra_arg2 = 20;
|
||||
var_dump( get_defined_functions($extra_arg, $extra_arg2) );
|
||||
|
||||
?>
|
||||
===Done===
|
||||
--EXPECTF--
|
||||
*** Testing get_defined_functions() : error conditions ***
|
||||
|
||||
-- Testing get_defined_functions() function with more than expected no. of arguments --
|
||||
|
||||
Warning: get_defined_functions() expects at most 1 parameter, 2 given in %s on line %d
|
||||
NULL
|
||||
===Done===
|
|
@ -1,18 +0,0 @@
|
|||
--TEST--
|
||||
Test wrong number of arguments for flush() (no impact)
|
||||
--FILE--
|
||||
<?php
|
||||
/*
|
||||
* proto void flush(void)
|
||||
* Function is implemented in ext/standard/basic_functions.c.
|
||||
*/
|
||||
|
||||
$extra_arg = 1;
|
||||
echo "\nToo many arguments\n";
|
||||
var_dump(flush($extra_arg));
|
||||
?>
|
||||
--EXPECTF--
|
||||
Too many arguments
|
||||
|
||||
Warning: flush() expects exactly 0 parameters, 1 given in %s on line %d
|
||||
NULL
|
|
@ -1,27 +0,0 @@
|
|||
--TEST--
|
||||
Test ob_clean() function : error conditions
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : proto bool ob_clean(void)
|
||||
* Description: Clean (delete) the current output buffer
|
||||
* Source code: main/output.c
|
||||
* Alias to functions:
|
||||
*/
|
||||
|
||||
echo "*** Testing ob_clean() : error conditions ***\n";
|
||||
|
||||
// One argument
|
||||
echo "\n-- Testing ob_clean() function with one argument --\n";
|
||||
$extra_arg = 10;
|
||||
var_dump( ob_clean($extra_arg) );
|
||||
|
||||
echo "Done";
|
||||
?>
|
||||
--EXPECTF--
|
||||
*** Testing ob_clean() : error conditions ***
|
||||
|
||||
-- Testing ob_clean() function with one argument --
|
||||
|
||||
Warning: ob_clean() expects exactly 0 parameters, 1 given in %s on line 13
|
||||
NULL
|
||||
Done
|
|
@ -1,21 +0,0 @@
|
|||
--TEST--
|
||||
Test wrong number of arguments for ob_end_clean()
|
||||
--FILE--
|
||||
<?php
|
||||
/*
|
||||
* proto bool ob_end_clean(void)
|
||||
* Function is implemented in main/output.c
|
||||
*/
|
||||
|
||||
$extra_arg = 1;
|
||||
|
||||
echo "\nToo many arguments\n";
|
||||
var_dump(ob_end_clean($extra_arg));
|
||||
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Too many arguments
|
||||
|
||||
Warning: ob_end_clean() expects exactly 0 parameters, 1 given in %s on line 10
|
||||
NULL
|
|
@ -1,27 +0,0 @@
|
|||
--TEST--
|
||||
Test ob_end_flush() function : error conditions
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : proto bool ob_end_flush(void)
|
||||
* Description: Flush (send) the output buffer, and delete current output buffer
|
||||
* Source code: main/output.c
|
||||
* Alias to functions:
|
||||
*/
|
||||
|
||||
echo "*** Testing ob_end_flush() : error conditions ***\n";
|
||||
|
||||
// One argument
|
||||
echo "\n-- Testing ob_end_flush() function with one argument --\n";
|
||||
$extra_arg = 10;
|
||||
var_dump( ob_end_flush($extra_arg) );
|
||||
|
||||
echo "Done";
|
||||
?>
|
||||
--EXPECTF--
|
||||
*** Testing ob_end_flush() : error conditions ***
|
||||
|
||||
-- Testing ob_end_flush() function with one argument --
|
||||
|
||||
Warning: ob_end_flush() expects exactly 0 parameters, 1 given in %s on line 13
|
||||
NULL
|
||||
Done
|
|
@ -1,27 +0,0 @@
|
|||
--TEST--
|
||||
Test ob_flush() function : error conditions
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : proto bool ob_flush(void)
|
||||
* Description: Flush (send) contents of the output buffer. The last buffer content is sent to next buffer
|
||||
* Source code: main/output.c
|
||||
* Alias to functions:
|
||||
*/
|
||||
|
||||
echo "*** Testing ob_flush() : error conditions ***\n";
|
||||
|
||||
// One argument
|
||||
echo "\n-- Testing ob_flush() function with one argument --\n";
|
||||
$extra_arg = 10;
|
||||
var_dump( ob_flush($extra_arg) );
|
||||
|
||||
echo "Done";
|
||||
?>
|
||||
--EXPECTF--
|
||||
*** Testing ob_flush() : error conditions ***
|
||||
|
||||
-- Testing ob_flush() function with one argument --
|
||||
|
||||
Warning: ob_flush() expects exactly 0 parameters, 1 given in %s on line 13
|
||||
NULL
|
||||
Done
|
|
@ -1,21 +0,0 @@
|
|||
--TEST--
|
||||
Test wrong number of arguments for ob_get_clean()
|
||||
--FILE--
|
||||
<?php
|
||||
/*
|
||||
* proto bool ob_get_clean(void)
|
||||
* Function is implemented in main/output.c
|
||||
*/
|
||||
|
||||
$extra_arg = 1;
|
||||
|
||||
echo "\nToo many arguments\n";
|
||||
var_dump(ob_get_clean($extra_arg));
|
||||
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Too many arguments
|
||||
|
||||
Warning: ob_get_clean() expects exactly 0 parameters, 1 given in %s on line 10
|
||||
NULL
|
|
@ -1,32 +0,0 @@
|
|||
--TEST--
|
||||
Test ob_get_contents() function : error cases
|
||||
--CREDITS--
|
||||
Iain Lewis <ilewis@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : proto string ob_get_contents(void)
|
||||
* Description: Return the contents of the output buffer
|
||||
* Source code: main/output.c
|
||||
* Alias to functions:
|
||||
*/
|
||||
|
||||
|
||||
echo "*** Testing ob_get_contents() : error cases ***\n";
|
||||
|
||||
var_dump(ob_get_contents("bob"));
|
||||
|
||||
ob_start();
|
||||
|
||||
var_dump(ob_get_contents("bob2",345));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
*** Testing ob_get_contents() : error cases ***
|
||||
|
||||
Warning: ob_get_contents() expects exactly 0 parameters, 1 given in %s on line 11
|
||||
NULL
|
||||
|
||||
Warning: ob_get_contents() expects exactly 0 parameters, 2 given in %s on line 15
|
||||
NULL
|
||||
Done
|
|
@ -1,21 +0,0 @@
|
|||
--TEST--
|
||||
Test wrong number of arguments for ob_get_length()
|
||||
--FILE--
|
||||
<?php
|
||||
/*
|
||||
* proto int ob_get_length(void)
|
||||
* Function is implemented in main/output.c
|
||||
*/
|
||||
|
||||
$extra_arg = 1;
|
||||
|
||||
echo "\nToo many arguments\n";
|
||||
var_dump(ob_get_length($extra_arg));
|
||||
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Too many arguments
|
||||
|
||||
Warning: ob_get_length() expects exactly 0 parameters, 1 given in %s on line 10
|
||||
NULL
|
|
@ -1,27 +0,0 @@
|
|||
--TEST--
|
||||
Test ob_get_level() function : error conditions
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : proto int ob_get_level(void)
|
||||
* Description: Return the nesting level of the output buffer
|
||||
* Source code: main/output.c
|
||||
* Alias to functions:
|
||||
*/
|
||||
|
||||
echo "*** Testing ob_get_level() : error conditions ***\n";
|
||||
|
||||
// One argument
|
||||
echo "\n-- Testing ob_get_level() function with one argument --\n";
|
||||
$extra_arg = 10;
|
||||
var_dump( ob_get_level($extra_arg) );
|
||||
|
||||
echo "Done";
|
||||
?>
|
||||
--EXPECTF--
|
||||
*** Testing ob_get_level() : error conditions ***
|
||||
|
||||
-- Testing ob_get_level() function with one argument --
|
||||
|
||||
Warning: ob_get_level() expects exactly 0 parameters, 1 given in %s on line 13
|
||||
NULL
|
||||
Done
|
|
@ -1,29 +0,0 @@
|
|||
--TEST--
|
||||
Test ob_implicit_flush() function : wrong number of arguments
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : proto void ob_implicit_flush([int flag])
|
||||
* Description: Turn implicit flush on/off and is equivalent to calling flush() after every output call
|
||||
* Source code: main/output.c
|
||||
* Alias to functions:
|
||||
*/
|
||||
|
||||
echo "*** Testing ob_implicit_flush() : error conditions ***\n";
|
||||
|
||||
|
||||
//Test ob_implicit_flush with one more than the expected number of arguments
|
||||
echo "\n-- Testing ob_implicit_flush() function with more than expected no. of arguments --\n";
|
||||
$flag = 10;
|
||||
$extra_arg = 10;
|
||||
var_dump( ob_implicit_flush($flag, $extra_arg) );
|
||||
|
||||
echo "Done";
|
||||
?>
|
||||
--EXPECTF--
|
||||
*** Testing ob_implicit_flush() : error conditions ***
|
||||
|
||||
-- Testing ob_implicit_flush() function with more than expected no. of arguments --
|
||||
|
||||
Warning: ob_implicit_flush() expects at most 1 parameter, 2 given in %s on line 15
|
||||
NULL
|
||||
Done
|
Loading…
Add table
Add a link
Reference in a new issue