helly Wed May 10 21:19:37 2006 UTC
Added files: (Branch: PHP_5_2)
/php-src/tests/classes abstract_user_call.phpt tostring_001.phpt
tostring_002.phpt tostring_003.phpt
Removed files:
/php-src/tests/classes interface_construct.phpt tostring.phpt
Modified files:
/php-src/tests/classes abstract_static.phpt interfaces_003.phpt
type_hinting_001.phpt type_hinting_003.phpt
Log:
- MFH tests
http://cvs.php.net/viewcvs.cgi/php-src/tests/classes/abstract_static.phpt?r1=1.3r2=1.3.6.1diff_format=u
Index: php-src/tests/classes/abstract_static.phpt
diff -u php-src/tests/classes/abstract_static.phpt:1.3
php-src/tests/classes/abstract_static.phpt:1.3.6.1
--- php-src/tests/classes/abstract_static.phpt:1.3 Sat Aug 9 14:48:47 2003
+++ php-src/tests/classes/abstract_static.phpt Wed May 10 21:19:37 2006
@@ -1,21 +1,29 @@
--TEST--
-ZE2 A static abstrcat method may not be called
---SKIPIF--
-?php if (version_compare(zend_version(), '2.0.0-dev', '')) die('skip
ZendEngine 2 needed'); ?
+ZE2 A static abstrcat methods
--FILE--
?php
-abstract class fail {
- abstract static function show();
+interface showable
+{
+ static function show();
}
-class pass extends fail {
+class pass implements showable
+{
static function show() {
echo Call to function show()\n;
}
}
pass::show();
+
+eval('
+class fail
+{
+ abstract static function func();
+}
+');
+
fail::show();
echo Done\n; // shouldn't be displayed
@@ -23,4 +31,4 @@
--EXPECTF--
Call to function show()
-Fatal error: Cannot call abstract method fail::show() in %s on line %d
+Fatal error: Static function fail::func() cannot be abstract in %s on line %d
http://cvs.php.net/viewcvs.cgi/php-src/tests/classes/interfaces_003.phpt?r1=1.1.2.2r2=1.1.2.2.2.1diff_format=u
Index: php-src/tests/classes/interfaces_003.phpt
diff -u php-src/tests/classes/interfaces_003.phpt:1.1.2.2
php-src/tests/classes/interfaces_003.phpt:1.1.2.2.2.1
--- php-src/tests/classes/interfaces_003.phpt:1.1.2.2 Thu Oct 6 18:34:16 2005
+++ php-src/tests/classes/interfaces_003.phpt Wed May 10 21:19:37 2006
@@ -7,27 +7,20 @@
interface MyInterface
{
- public function __construct(Object $o);
+ public function __construct(MyObject $o);
}
class MyTestClass implements MyInterface
{
- public function __construct(Object $o)
+ public function __construct(MyObject $o)
{
}
}
$obj = new MyTestClass;
-class MyTestFail
-{
- public function __construct()
- {
- }
-}
-
?
===DONE===
--EXPECTF--
-Fatal error: Argument 1 passed to MyTestClass::__construct() must be an object
of class Object, called in %sinterfaces_003.php on line %d
+Catchable fatal error: Argument 1 passed to MyTestClass::__construct() must be
an object of class MyObject, called in %sinterfaces_003.php on line %d
http://cvs.php.net/viewcvs.cgi/php-src/tests/classes/type_hinting_001.phpt?r1=1.3.2.1r2=1.3.2.1.2.1diff_format=u
Index: php-src/tests/classes/type_hinting_001.phpt
diff -u php-src/tests/classes/type_hinting_001.phpt:1.3.2.1
php-src/tests/classes/type_hinting_001.phpt:1.3.2.1.2.1
--- php-src/tests/classes/type_hinting_001.phpt:1.3.2.1 Thu Sep 15 19:49:58 2005
+++ php-src/tests/classes/type_hinting_001.phpt Wed May 10 21:19:37 2006
@@ -35,4 +35,4 @@
?
--EXPECTF--
-Fatal error: Argument 1 passed to FooBar::a() must implement interface Foo,
called in %s on line 27 and defined in %s on line 12
+Catchable fatal error: Argument 1 passed to FooBar::a() must implement
interface Foo, called in %s on line 27 and defined in %s on line 12
http://cvs.php.net/viewcvs.cgi/php-src/tests/classes/type_hinting_003.phpt?r1=1.1.2.2r2=1.1.2.2.2.1diff_format=u
Index: php-src/tests/classes/type_hinting_003.phpt
diff -u php-src/tests/classes/type_hinting_003.phpt:1.1.2.2
php-src/tests/classes/type_hinting_003.phpt:1.1.2.2.2.1
--- php-src/tests/classes/type_hinting_003.phpt:1.1.2.2 Tue Nov 15 21:33:10 2005
+++ php-src/tests/classes/type_hinting_003.phpt Wed May 10 21:19:37 2006
@@ -57,4 +57,4 @@
int(25)
}
-Fatal error: Argument 1 passed to Test::f1() must be an array, called in
%stype_hinting_003.php on line %d and defined in %stype_hinting_003.php on line
%d
+Catchable fatal error: Argument 1 passed to Test::f1() must be an array,
called in %stype_hinting_003.php on line %d and defined in
%stype_hinting_003.php on line %d
http://cvs.php.net/viewcvs.cgi/php-src/tests/classes/abstract_user_call.phpt?view=markuprev=1.1
Index: php-src/tests/classes/abstract_user_call.phpt
+++ php-src/tests/classes/abstract_user_call.phpt
--TEST--
ZE2 An abstrcat method cannot be called indirectly
--FILE--
?php
abstract class test_base
{
abstract function func();
}
class test extends test_base
{
function func()
{
echo __METHOD__ . ()\n;