fix old and add new http\Client\Curl\Versions constants
[m6w6/ext-http] / tests / serialize001.phpt
index 2e06afe4f7c3bde0109b000172d8bef2f08ca581..ac43dce0977613f68eea534e0775835c38fe63cc 100644 (file)
@@ -1,20 +1,13 @@
 --TEST--
 serialization
 --SKIPIF--
-<?php include "skipif.inc"; ?>
+<?php
+include "skipif.inc";
+skip_client_test();
+?>
 --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 +16,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")));
-               }
        }
 }
 ?>