From cde37a23b06a04a76e5f226495643306ee0b94f8 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Tue, 3 Jun 2008 15:36:59 +0000 Subject: [PATCH] - New tests --- Zend/tests/call_static_002.phpt | 28 +++++++++++++++++++++++ Zend/tests/call_static_003.phpt | 40 +++++++++++++++++++++++++++++++++ Zend/tests/call_static_004.phpt | 23 +++++++++++++++++++ Zend/tests/call_static_005.phpt | 17 ++++++++++++++ Zend/tests/call_static_006.phpt | 32 ++++++++++++++++++++++++++ Zend/tests/call_static_007.phpt | 36 +++++++++++++++++++++++++++++ 6 files changed, 176 insertions(+) create mode 100644 Zend/tests/call_static_002.phpt create mode 100644 Zend/tests/call_static_003.phpt create mode 100644 Zend/tests/call_static_004.phpt create mode 100644 Zend/tests/call_static_005.phpt create mode 100644 Zend/tests/call_static_006.phpt create mode 100644 Zend/tests/call_static_007.phpt diff --git a/Zend/tests/call_static_002.phpt b/Zend/tests/call_static_002.phpt new file mode 100644 index 0000000000..ba8fc6eee3 --- /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 +unicode(3) "aAa" +static +unicode(3) "aAa" diff --git a/Zend/tests/call_static_003.phpt b/Zend/tests/call_static_003.phpt new file mode 100644 index 0000000000..f4128bdebb --- /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 +unicode(6) "fOoBaR" +nonstatic +unicode(6) "foOBAr" +nonstatic +unicode(6) "fOOBAr" +static +unicode(3) "bAr" +static +unicode(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..f5df139dd0 --- /dev/null +++ b/Zend/tests/call_static_006.phpt @@ -0,0 +1,32 @@ +--TEST-- +Testing __callStatic +--XFAIL-- +http://bugs.php.net/bug.php?id=45089 +--FILE-- + +--EXPECTF-- +Strict Standards: Non-static method foo::aa() should not be called statically in %s on line %d +ok + +Strict Standards: Non-static method foo::aa() should not be called statically in %s on line %d +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 -- 2.40.0