Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve portability of the test suite #244

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/arrays/arrays.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -398,16 +398,16 @@ array(3) {
}
123 6 13

Notice: Undefined %s: 1 in %s/arrays/arrays.php on line 108
Notice: Undefined %s: 1 in %s on line %d
$v[1] is ><

Notice: Undefined variable: v1 in %s/arrays/arrays.php on line 108
Notice: Undefined variable: v1 in %s on line %d
NULL

Notice: Undefined %s: 4 in %s/arrays/arrays.php on line 109
Notice: Undefined %s: 4 in %s on line %d
$v[4] is ><

Notice: Undefined variable: v1 in %s/arrays/arrays.php on line 109
Notice: Undefined variable: v1 in %s on line %d
NULL
array(5) {
[7]=>
Expand Down
2 changes: 1 addition & 1 deletion tests/classes/dynamic_properties2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ unset($p->color); // remove the property "color"
--EXPECTF--
bool(false)

Notice: Undefined property: Point::$color in %s/classes/dynamic_properties2.php on line 9
Notice: Undefined property: Point::$color in %s on line %d
NULL
2 changes: 1 addition & 1 deletion tests/classes/dynamic_properties3.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var_dump($c);
--EXPECTF--
get

Notice: Undefined property: C::$prop in %s/classes/dynamic_properties3.php on line 15
Notice: Undefined property: C::$prop in %s on line %d
set
int(123)
object(C)#1 (1) {
Expand Down
2 changes: 1 addition & 1 deletion tests/classes/overloading_2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ unset($p->color); // remove the property "color"
--EXPECTF--
bool(false)

Notice: Undefined property: Point::$color in %s/classes/overloading_2.php on line 9
Notice: Undefined property: Point::$color in %s on line %d
NULL
2 changes: 1 addition & 1 deletion tests/classes/overloading_play.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ declared: 987
----------------------
Getting 'hidden'

Notice: Undefined property via __get(): hidden in %s/classes/overloading_play.php on line 71 in %s/classes/overloading_play.php on line 34
Notice: Undefined property via __get(): hidden in %s on line %d in %s on line %d
NULL
----------------------
Is 'hidden' set?
Expand Down
2 changes: 1 addition & 1 deletion tests/classes/overloading_properties2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ unset($p->color); // remove the property "color"
--EXPECTF--
bool(false)

Notice: Undefined property: Point::$color in %s/classes/overloading_properties2.php on line 9
Notice: Undefined property: Point::$color in %s on line %d
NULL
Binary file modified tests/classes/sleep_and_wakeup.phpt
Binary file not shown.
12 changes: 6 additions & 6 deletions tests/constants/constants.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -204,24 +204,24 @@ define CON22 succeeded; value is >65.3<
define 36ABC succeeded; value is >100<
define #%& succeeded; value is >200<

Notice: Constant MY_COLOR already defined in %s/constants/constants.php on line 13
Notice: Constant MY_COLOR already defined in %s on line %d
define MY_COLOR failed; value is >red<

Notice: Constant TRUE already defined in %s/constants/constants.php on line 13
Notice: Constant TRUE already defined in %s on line %d
define TRUE failed; value is >1<
TRUE's value:1
define COLORS succeeded
Notice: Array to string conversion in %s/constants/constants.php on line 16
Notice: Array to string conversion in %s on line %d
; value is >Array<

Warning: Constants may only evaluate to scalar values, arrays or resources in %s/constants/constants.php on line 13
Warning: Constants may only evaluate to scalar values, arrays or resources in %s on line %d
define MY_OBJECT failed; not defined

Warning: fopen(Testfile.txt): failed to open stream: No such file or directory in %s/constants/constants.php on line 90
Warning: fopen(Testfile.txt): failed to open stream: No such file or directory in %s on line %d
Can't open file
define MY_RESOURCE succeeded; value is ><

Notice: Constant MY_RESOURCE already defined in %s/constants/constants.php on line 13
Notice: Constant MY_RESOURCE already defined in %s on line %d
define MY_RESOURCE failed; value is ><
define CON61 succeeded; value is >321<
define CON63 succeeded; value is >321<
Expand Down
10 changes: 5 additions & 5 deletions tests/constants/core_predefined_constants.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ $datePlus1->xx();
include_once('includefile.inc');
--EXPECTF--
__LINE__: int(17)
__FILE__: string(%d) "%s/constants/core_predefined_constants.php"
__DIR__: string(%d) "%s/constants"
string(%d) "%s/constants"
__FILE__: string(%d) "%s%econstants%ecore_predefined_constants.php"
__DIR__: string(%d) "%s%econstants"
string(%d) "%s%econstants"
__LINE__: int(24)
__NAMESPACE__: string(0) ""
-----------------------------------------
Expand Down Expand Up @@ -191,8 +191,8 @@ __CLASS__: string(8) "DatePlus"
Inside DatePlus::xx
__FUNCTION__: string(2) "xx"
Inside includefile.php
string(%d) "%s/constants/includefile.inc"
string(%d) "%s/constants"
string(%d) "%s%econstants%eincludefile.inc"
string(%d) "%s%econstants"
Inside Date::__destruct
__FUNCTION__: string(10) "__destruct"
Inside Date::__destruct
Expand Down
4 changes: 2 additions & 2 deletions tests/constants/core_predefined_constants2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ PHP_DEBUG: %s
PHP_MAXPATHLEN: int(%d)
PHP_OS: string(%d) "%s"
PHP_SAPI: string(3) "cli"
PHP_EOL: string(1) "
PHP_EOL: string(%d) "
"
DEFAULT_INCLUDE_PATH: string(%d) "%S"
PEAR_INSTALL_DIR: string(%d) "%S"
Expand All @@ -88,7 +88,7 @@ PHP_DATADIR: string(%d) "%S"
PHP_SYSCONFDIR: string(%d) "%S"
PHP_CONFIG_FILE_PATH: string(%d) "%S"
PHP_CONFIG_FILE_SCAN_DIR: string(%d) "%S"
PHP_SHLIB_SUFFIX: string(2) "so"
PHP_SHLIB_SUFFIX: string(%d) "%S"
E_ERROR: int(1)
E_WARNING: int(2)
E_PARSE: int(4)
Expand Down
64 changes: 32 additions & 32 deletions tests/exception_handling/exception_class.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ fL1(10);
--EXPECTF--
L0: In try-block
L0: In catch-block
$e = >Exception: L0 Message in %s/exception_handling/exception_class.php:127
$e = >Exception: L0 Message in %s%eexception_handling%eexception_class.php:127
Stack trace:
#0 {main}<
getMessage: >L0 Message<
getCode: >-1<
getPrevious: ><
getFile: >%s/exception_handling/exception_class.php<
getFile: >%s%eexception_handling%eexception_class.php<
getLine: >127<
getTraceAsString: >#0 {main}<
array(0) {
Expand All @@ -163,22 +163,22 @@ L0: Beyond try/catch/finally blocks
L0: Calling fL1
fL1: In try-block
fL1: In catch-block
$e = >Exception: fL1 Message in %s/exception_handling/exception_class.php:55
$e = >Exception: fL1 Message in %s%eexception_handling%eexception_class.php:55
Stack trace:
#0 %s/exception_handling/exception_class.php(140): fL1(10)
#0 %s%eexception_handling%eexception_class.php(140): fL1(10)
#1 {main}<
getMessage: >fL1 Message<
getCode: >123<
getPrevious: ><
getFile: >%s/exception_handling/exception_class.php<
getFile: >%s%eexception_handling%eexception_class.php<
getLine: >55<
getTraceAsString: >#0 %s/exception_handling/exception_class.php(140): fL1(10)
getTraceAsString: >#0 %s%eexception_handling%eexception_class.php(140): fL1(10)
#1 {main}<
array(1) {
[0]=>
array(4) {
["file"]=>
string(%d) "%s/exception_handling/exception_class.php"
string(%d) "%s%eexception_handling%eexception_class.php"
["line"]=>
int(140)
["function"]=>
Expand All @@ -192,7 +192,7 @@ array(1) {
}
Trace Info:
Key[0]:
Key[file] => >%s/exception_handling/exception_class.php<
Key[file] => >%s%eexception_handling%eexception_class.php<
Key[line] => >140<
Key[function] => >fL1<
Key[args]:
Expand All @@ -203,24 +203,24 @@ fL1: Beyond try/catch/finally blocks
fL1: Calling fL2
fL2: In try-block
fL2: In catch-block
$e = >Exception: fL2 Message in %s/exception_handling/exception_class.php:81
$e = >Exception: fL2 Message in %s%eexception_handling%eexception_class.php:81
Stack trace:
#0 %s/exception_handling/exception_class.php(69): fL2(2.3, -4.5)
#1 %s/exception_handling/exception_class.php(140): fL1(10)
#0 %s%eexception_handling%eexception_class.php(69): fL2(2.3, -4.5)
#1 %s%eexception_handling%eexception_class.php(140): fL1(10)
#2 {main}<
getMessage: >fL2 Message<
getCode: >234<
getPrevious: ><
getFile: >%s/exception_handling/exception_class.php<
getFile: >%s%eexception_handling%eexception_class.php<
getLine: >81<
getTraceAsString: >#0 %s/exception_handling/exception_class.php(69): fL2(2.3, -4.5)
#1 %s/exception_handling/exception_class.php(140): fL1(10)
getTraceAsString: >#0 %s%eexception_handling%eexception_class.php(69): fL2(2.3, -4.5)
#1 %s%eexception_handling%eexception_class.php(140): fL1(10)
#2 {main}<
array(2) {
[0]=>
array(4) {
["file"]=>
string(%d) "%s/exception_handling/exception_class.php"
string(%d) "%s%eexception_handling%eexception_class.php"
["line"]=>
int(69)
["function"]=>
Expand All @@ -236,7 +236,7 @@ array(2) {
[1]=>
array(4) {
["file"]=>
string(%d) "%s/exception_handling/exception_class.php"
string(%d) "%s%eexception_handling%eexception_class.php"
["line"]=>
int(140)
["function"]=>
Expand All @@ -250,14 +250,14 @@ array(2) {
}
Trace Info:
Key[0]:
Key[file] => >%s/exception_handling/exception_class.php<
Key[file] => >%s%eexception_handling%eexception_class.php<
Key[line] => >69<
Key[function] => >fL2<
Key[args]:
Key[0] => >2.3<
Key[1] => >-4.5<
Key[1]:
Key[file] => >%s/exception_handling/exception_class.php<
Key[file] => >%s%eexception_handling%eexception_class.php<
Key[line] => >140<
Key[function] => >fL1<
Key[args]:
Expand All @@ -268,26 +268,26 @@ fL2: Beyond try/catch/finally blocks
fL2: Calling fL3
fL3: In try-block
fL3: In catch-block
$e = >Exception: fL3 Message in %s/exception_handling/exception_class.php:107
$e = >Exception: fL3 Message in %s%eexception_handling%eexception_class.php:107
Stack trace:
#0 %s/exception_handling/exception_class.php(95): fL3('xyz', NULL, true)
#1 %s/exception_handling/exception_class.php(69): fL2(2.3, -4.5)
#2 %s/exception_handling/exception_class.php(140): fL1(10)
#0 %s%eexception_handling%eexception_class.php(95): fL3('xyz', NULL, true)
#1 %s%eexception_handling%eexception_class.php(69): fL2(2.3, -4.5)
#2 %s%eexception_handling%eexception_class.php(140): fL1(10)
#3 {main}<
getMessage: >fL3 Message<
getCode: >345<
getPrevious: ><
getFile: >%s/exception_handling/exception_class.php<
getFile: >%s%eexception_handling%eexception_class.php<
getLine: >107<
getTraceAsString: >#0 %s/exception_handling/exception_class.php(95): fL3('xyz', NULL, true)
#1 %s/exception_handling/exception_class.php(69): fL2(2.3, -4.5)
#2 %s/exception_handling/exception_class.php(140): fL1(10)
getTraceAsString: >#0 %s%eexception_handling%eexception_class.php(95): fL3('xyz', NULL, true)
#1 %s%eexception_handling%eexception_class.php(69): fL2(2.3, -4.5)
#2 %s%eexception_handling%eexception_class.php(140): fL1(10)
#3 {main}<
array(3) {
[0]=>
array(4) {
["file"]=>
string(%d) "%s/exception_handling/exception_class.php"
string(%d) "%s%eexception_handling%eexception_class.php"
["line"]=>
int(95)
["function"]=>
Expand All @@ -305,7 +305,7 @@ array(3) {
[1]=>
array(4) {
["file"]=>
string(%d) "%s/exception_handling/exception_class.php"
string(%d) "%s%eexception_handling%eexception_class.php"
["line"]=>
int(69)
["function"]=>
Expand All @@ -321,7 +321,7 @@ array(3) {
[2]=>
array(4) {
["file"]=>
string(%d) "%s/exception_handling/exception_class.php"
string(%d) "%s%eexception_handling%eexception_class.php"
["line"]=>
int(140)
["function"]=>
Expand All @@ -335,22 +335,22 @@ array(3) {
}
Trace Info:
Key[0]:
Key[file] => >%s/exception_handling/exception_class.php<
Key[file] => >%s%eexception_handling%eexception_class.php<
Key[line] => >95<
Key[function] => >fL3<
Key[args]:
Key[0] => >xyz<
Key[1] => ><
Key[2] => >1<
Key[1]:
Key[file] => >%s/exception_handling/exception_class.php<
Key[file] => >%s%eexception_handling%eexception_class.php<
Key[line] => >69<
Key[function] => >fL2<
Key[args]:
Key[0] => >2.3<
Key[1] => >-4.5<
Key[2]:
Key[file] => >%s/exception_handling/exception_class.php<
Key[file] => >%s%eexception_handling%eexception_class.php<
Key[line] => >140<
Key[function] => >fL1<
Key[args]:
Expand Down
Loading