]> granicus.if.org Git - php/commitdiff
This commit was manufactured by cvs2svn to create branch 'PHP_5_0'.
authorSVN Migration <svn@php.net>
Sun, 26 Sep 2004 18:28:08 +0000 (18:28 +0000)
committerSVN Migration <svn@php.net>
Sun, 26 Sep 2004 18:28:08 +0000 (18:28 +0000)
ext/standard/tests/serialize/autoload_implements.p5c [new file with mode: 0755]
ext/standard/tests/serialize/autoload_interface.p5c [new file with mode: 0755]
ext/standard/tests/serialize/bug30234.phpt [new file with mode: 0755]

diff --git a/ext/standard/tests/serialize/autoload_implements.p5c b/ext/standard/tests/serialize/autoload_implements.p5c
new file mode 100755 (executable)
index 0000000..2c3479c
--- /dev/null
@@ -0,0 +1,10 @@
+<?php
+
+class autoload_implements implements autoload_interface {
+       function testFunction()
+       {
+               return true;
+       }
+}
+
+?>
\ No newline at end of file
diff --git a/ext/standard/tests/serialize/autoload_interface.p5c b/ext/standard/tests/serialize/autoload_interface.p5c
new file mode 100755 (executable)
index 0000000..6908155
--- /dev/null
@@ -0,0 +1,7 @@
+<?php
+
+interface autoload_interface {
+       function testFunction();
+}
+
+?>
\ No newline at end of file
diff --git a/ext/standard/tests/serialize/bug30234.phpt b/ext/standard/tests/serialize/bug30234.phpt
new file mode 100755 (executable)
index 0000000..37fc8cd
--- /dev/null
@@ -0,0 +1,40 @@
+--TEST--
+#30234 (__autoload() not invoked for interfaces)
+--SKIPIF--
+<?php 
+       if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
+?>
+--FILE--
+<?php
+
+function __autoload($class_name)
+{
+       require_once(dirname(__FILE__) . '/' . strtolower($class_name) . '.p5c');
+       echo __FUNCTION__ . '(' . $class_name . ")\n";
+}
+
+var_dump(interface_exists('autoload_interface', false));
+var_dump(class_exists('autoload_implements', false));
+
+$o = unserialize('O:19:"Autoload_Implements":0:{}');
+
+var_dump($o);
+var_dump($o instanceof autoload_interface);
+unset($o);
+
+var_dump(interface_exists('autoload_interface', false));
+var_dump(class_exists('autoload_implements', false));
+
+?>
+===DONE===
+--EXPECTF--
+bool(false)
+bool(false)
+__autoload(autoload_interface)
+__autoload(Autoload_Implements)
+object(autoload_implements)#%d (0) {
+}
+bool(true)
+bool(true)
+bool(true)
+===DONE===