X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=tests%2Fserialize001.phpt;h=411e4a3aa1f6546d26129da260b14fd65517d6dd;hp=2e06afe4f7c3bde0109b000172d8bef2f08ca581;hb=a258b01227b9a0b01b590a3df43eebc60d3b4189;hpb=575f4ce7a82c2c2bf4fb597f6a3a3de077403910 diff --git a/tests/serialize001.phpt b/tests/serialize001.phpt index 2e06afe..411e4a3 100644 --- a/tests/serialize001.phpt +++ b/tests/serialize001.phpt @@ -5,16 +5,6 @@ serialization --FILE-- 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"))); - } } } ?>