update test
[m6w6/ext-http] / tests / serialize001.phpt
index 2e06afe4f7c3bde0109b000172d8bef2f08ca581..411e4a3aa1f6546d26129da260b14fd65517d6dd 100644 (file)
@@ -5,16 +5,6 @@ serialization
 --FILE--
 <?php
 
-class Client extends \http\Client\AbstractClient
-{
-       function __construct() {
-               parent::__construct();
-               $this->request = new \http\Client\Request("GET", "http://localhost");
-       }
-       function send($request) {
-       }
-}
-
 $ext = new ReflectionExtension("http");
 foreach ($ext->getClasses() as $class) {
        if ($class->isInstantiable()) {
@@ -23,16 +13,12 @@ foreach ($ext->getClasses() as $class) {
                $serialized = serialize($instance);
                $unserialized = unserialize($serialized);
                
-               foreach (["toString", "toArray"] as $m) {
+               foreach (array("toString", "toArray") as $m) {
                        if ($class->hasMethod($m)) {
                                #printf("%s#%s\n", $class->getName(), $m);
                                $unserialized->$m();
                        }
                }
-               if ($class->hasMethod("attach") && !$class->implementsInterface("\\SplSubject")) {
-                       #printf("%s#%s\n", $class->getName(), "attach");
-                       $unserialized->attach((new http\Curl\Client)->setRequest(new http\Client\Request("GET", "http://localhost")));
-               }
        }
 }
 ?>