From: Marcus Boerger Date: Sat, 7 Dec 2002 14:27:29 +0000 (+0000) Subject: Adding a test for abstract class instanciation X-Git-Tag: RELEASE_1_0b3~129 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8e268d281640f1da50b970f6da2408d323544fd1;p=php Adding a test for abstract class instanciation --- diff --git a/tests/classes/abstract_class.phpt b/tests/classes/abstract_class.phpt new file mode 100644 index 0000000000..aa0a90dc88 --- /dev/null +++ b/tests/classes/abstract_class.phpt @@ -0,0 +1,29 @@ +--TEST-- +An abstract class cannot be instanciated +--SKIPIF-- + +--FILE-- +show(); + +$t = new fail(); +$t->show(); + +echo "Done\n"; // shouldn't be displayed of cause +?> +--EXPECTF-- +Call to function show() + +Fatal error: Cannot instanciate abstract class fail in %s on line %d