From: Felipe Pena Date: Tue, 3 Jun 2008 15:30:04 +0000 (+0000) Subject: - New tests X-Git-Tag: BEFORE_NEW_PARAMETER_PARSE~84 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6ff90104aa43d021e762ccc8b6335480a7af1083;p=php - New tests --- diff --git a/Zend/tests/call_static_002.phpt b/Zend/tests/call_static_002.phpt new file mode 100644 index 0000000000..d570bcb6fc --- /dev/null +++ b/Zend/tests/call_static_002.phpt @@ -0,0 +1,28 @@ +--TEST-- +Testing __call and __callstatic with callbacks +--XFAIL-- +http://bugs.php.net/bug.php?id=45089 +--FILE-- + +--EXPECTF-- +nonstatic +string(3) "aAa" +static +string(3) "aAa" diff --git a/Zend/tests/call_static_003.phpt b/Zend/tests/call_static_003.phpt new file mode 100644 index 0000000000..e41508b076 --- /dev/null +++ b/Zend/tests/call_static_003.phpt @@ -0,0 +1,40 @@ +--TEST-- +Testing method name case +--XFAIL-- +http://bugs.php.net/bug.php?id=45089 +--FILE-- +fOoBaR(); + self::foOBAr(); + $this::fOOBAr(); + } +} + +$a = new Foo; +$a->test(); +$a::bAr(); +foo::BAZ(); + +?> +--EXPECT-- +nonstatic +string(6) "fOoBaR" +nonstatic +string(6) "foOBAr" +nonstatic +string(6) "fOOBAr" +static +string(3) "bAr" +static +string(3) "BAZ" diff --git a/Zend/tests/call_static_004.phpt b/Zend/tests/call_static_004.phpt new file mode 100644 index 0000000000..40d65cfa94 --- /dev/null +++ b/Zend/tests/call_static_004.phpt @@ -0,0 +1,23 @@ +--TEST-- +Invalid method name in dynamic static call +--XFAIL-- +http://bugs.php.net/bug.php?id=45089 +--FILE-- + +--EXPECTF-- +unicode(3) "AaA" + +Fatal error: Function name must be a string in %s on line %d diff --git a/Zend/tests/call_static_005.phpt b/Zend/tests/call_static_005.phpt new file mode 100644 index 0000000000..7259857e55 --- /dev/null +++ b/Zend/tests/call_static_005.phpt @@ -0,0 +1,17 @@ +--TEST-- +Invalid method name in dynamic static call +--FILE-- + +--EXPECTF-- +Fatal error: Call to undefined function foo::() in %s on line %d diff --git a/Zend/tests/call_static_006.phpt b/Zend/tests/call_static_006.phpt new file mode 100644 index 0000000000..5a4da2e0ac --- /dev/null +++ b/Zend/tests/call_static_006.phpt @@ -0,0 +1,29 @@ +--TEST-- +Testing __callStatic +--XFAIL-- +http://bugs.php.net/bug.php?id=45089 +--FILE-- + +--EXPECTF-- +ok +ok + +Fatal error: Can not call constructor in %s on line %d diff --git a/Zend/tests/call_static_007.phpt b/Zend/tests/call_static_007.phpt new file mode 100644 index 0000000000..3b2b027d25 --- /dev/null +++ b/Zend/tests/call_static_007.phpt @@ -0,0 +1,36 @@ +--TEST-- +Testing __call and __callstatic +--XFAIL-- +http://bugs.php.net/bug.php?id=45089 +--FILE-- +$b(); + +$a->baz(); + +a::Foo(); + +?> +--EXPECT-- +__callstatic: Test +__call: Test +__call: Bar +__callstatic: Foo