From 8251858120e04674b01cde63cd948ef4b0794e31 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sat, 21 Jun 2003 19:10:08 +0000 Subject: Add test case for abstract classes --- tests/classes/class_abstract.phpt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 tests/classes/class_abstract.phpt (limited to 'tests') diff --git a/tests/classes/class_abstract.phpt b/tests/classes/class_abstract.phpt new file mode 100755 index 0000000000..7f93c35f90 --- /dev/null +++ b/tests/classes/class_abstract.phpt @@ -0,0 +1,28 @@ +--TEST-- +An abstract class cannot be instanciated +--SKIPIF-- + +--FILE-- +show(); + +$t = new base(); +$t->show(); + +echo "Done\n"; // shouldn't be displayed +?> +--EXPECTF-- +base + +Fatal error: Cannot instantiate abstract class base in %s on line %d -- cgit v1.2.1