tony2001 Mon Mar 17 14:59:24 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src/tests/classes final_ctor3.phpt inheritance_005.phpt
Log:
fix tests
http://cvs.php.net/viewvc.cgi/php-src/tests/classes/final_ctor3.phpt?r1=1.1.4.2&r2=1.1.4.3&diff_format=u
Index: php-src/tests/classes/final_ctor3.phpt
diff -u php-src/tests/classes/final_ctor3.phpt:1.1.4.2
php-src/tests/classes/final_ctor3.phpt:1.1.4.3
--- php-src/tests/classes/final_ctor3.phpt:1.1.4.2 Wed Jan 30 14:25:42 2008
+++ php-src/tests/classes/final_ctor3.phpt Mon Mar 17 14:59:23 2008
@@ -6,10 +6,8 @@
final function A() { }
}
class B extends A {
- }
- class C extends B {
- function B() { }
+ function A() { }
}
?>
--EXPECTF--
-Fatal error: Cannot override final method A::B() in %s on line 9
+Fatal error: Cannot override final method A::A() in %s on line %d
http://cvs.php.net/viewvc.cgi/php-src/tests/classes/inheritance_005.phpt?r1=1.1.4.2&r2=1.1.4.3&diff_format=u
Index: php-src/tests/classes/inheritance_005.phpt
diff -u php-src/tests/classes/inheritance_005.phpt:1.1.4.2
php-src/tests/classes/inheritance_005.phpt:1.1.4.3
--- php-src/tests/classes/inheritance_005.phpt:1.1.4.2 Wed Jan 30 14:25:42 2008
+++ php-src/tests/classes/inheritance_005.phpt Mon Mar 17 14:59:23 2008
@@ -19,24 +19,39 @@
}
- echo "About to construct new B: ";
+ echo "About to construct new B: \n";
$b = new B;
- echo "About to invoke implicit B::B(): ";
- $b->B();
- echo "\nAbout to construct new C: ";
+ echo "Is B::B() callable?\n";
+ var_dump(is_callable(array($b, "B")));
+
+ echo "Is B::A() callable?\n";
+ var_dump(is_callable(array($b, "A")));
+
+ echo "About to construct new C: \n";
$c = new C;
- echo "About to invoke implicit C::B(): ";
- $c->B();
- echo "About to invoke implicit C::C(): ";
- $c->C();
-?>
---EXPECTF--
-About to construct new B: In A::A
-About to invoke implicit B::B(): In A::A
-About to construct new C: In A::A
-About to invoke implicit C::B(): In A::A
-About to invoke implicit C::C(): In A::A
+ echo "Is C::A() callable?\n";
+ var_dump(is_callable(array($c, "A")));
+ echo "Is C::B() callable?\n";
+ var_dump(is_callable(array($c, "B")));
+ echo "Is C::C() callable?\n";
+ var_dump(is_callable(array($c, "C")));
+?>
+--EXPECTF--
+About to construct new B:
+In A::A
+Is B::B() callable?
+bool(false)
+Is B::A() callable?
+bool(true)
+About to construct new C:
+In A::A
+Is C::A() callable?
+bool(true)
+Is C::B() callable?
+bool(false)
+Is C::C() callable?
+bool(false)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php