From 622b45e2a987a4fe8bcd080aa1bc51ad59241e48 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sun, 24 Nov 2002 15:50:28 +0000 Subject: [PATCH] Add test against mixing static/non static methods --- tests/classes/static_mix_1.phpt | 26 ++++++++++++++++++++++++++ tests/classes/static_mix_2.phpt | 27 +++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 tests/classes/static_mix_1.phpt create mode 100644 tests/classes/static_mix_2.phpt diff --git a/tests/classes/static_mix_1.phpt b/tests/classes/static_mix_1.phpt new file mode 100644 index 0000000000..47950b3165 --- /dev/null +++ b/tests/classes/static_mix_1.phpt @@ -0,0 +1,26 @@ +--TEST-- +You cannot overload astatic methods with a non static methods +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Fatal error: Cannot make static method pass::show() non static in class fail in %s on line %d \ No newline at end of file diff --git a/tests/classes/static_mix_2.phpt b/tests/classes/static_mix_2.phpt new file mode 100644 index 0000000000..949b9a1b8d --- /dev/null +++ b/tests/classes/static_mix_2.phpt @@ -0,0 +1,27 @@ +--TEST-- +You cannot overload a non static methods with a static methods +--SKIPIF-- + +--FILE-- +show(); +fail::show(); + +echo "Done\n"; // shouldn't be displayed of cause +?> +--EXPECTF-- +Fatal error: Cannot make non static method pass::show() static in class fail in %s on line %d \ No newline at end of file -- 2.50.1