From: Marcus Boerger Date: Mon, 2 Aug 2004 08:29:59 +0000 (+0000) Subject: MFB Enforce protocol of magic methods/classes X-Git-Tag: PRE_ZEND_VM_DISPATCH_PATCH~277 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1e6c12c919686a74ea4fb17a9bea5fc231b73035;p=php MFB Enforce protocol of magic methods/classes --- diff --git a/tests/classes/__call_002.phpt b/tests/classes/__call_002.phpt new file mode 100755 index 0000000000..53a179f787 --- /dev/null +++ b/tests/classes/__call_002.phpt @@ -0,0 +1,15 @@ +--TEST-- +ZE2 __call() signature check +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Fatal error: Method Test::__call() must take exactly 2 arguments in %s__call_002.php on line %d diff --git a/tests/classes/__set__get_002.phpt b/tests/classes/__set__get_002.phpt new file mode 100755 index 0000000000..71111ccdf8 --- /dev/null +++ b/tests/classes/__set__get_002.phpt @@ -0,0 +1,14 @@ +--TEST-- +ZE2 __get() signature check +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Fatal error: Method Test::__get() must take exactly 1 argument in %s__set__get_002.php on line %d diff --git a/tests/classes/__set__get_003.phpt b/tests/classes/__set__get_003.phpt new file mode 100755 index 0000000000..390d303362 --- /dev/null +++ b/tests/classes/__set__get_003.phpt @@ -0,0 +1,14 @@ +--TEST-- +ZE2 __set() signature check +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Fatal error: Method Test::__set() must take exactly 2 arguments in %s__set__get_003.php on line %d diff --git a/tests/classes/destructor_visibility_001.phpt b/tests/classes/destructor_visibility_001.phpt new file mode 100755 index 0000000000..7674c512f6 --- /dev/null +++ b/tests/classes/destructor_visibility_001.phpt @@ -0,0 +1,24 @@ +--TEST-- +ZE2 Ensuring destructor visibility +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECTF-- +Fatal error: Call to private Derived::__destruct() from context '' in %sdestructor_visibility_001.php on line %d diff --git a/tests/classes/destructor_visibility_002.phpt b/tests/classes/destructor_visibility_002.phpt new file mode 100755 index 0000000000..2cc83334a9 --- /dev/null +++ b/tests/classes/destructor_visibility_002.phpt @@ -0,0 +1,24 @@ +--TEST-- +ZE2 Ensuring destructor visibility +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECTF-- +===DONE=== + +Warning: Call to private Derived::__destruct() from context '' during shutdown ignored in Unknown on line %d diff --git a/tests/classes/destructor_visibility_003.phpt b/tests/classes/destructor_visibility_003.phpt new file mode 100755 index 0000000000..83e3efe22e --- /dev/null +++ b/tests/classes/destructor_visibility_003.phpt @@ -0,0 +1,28 @@ +--TEST-- +ZE2 Ensuring destructor visibility +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECTF-- +Derived::__destruct +===DONE===