X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=tests%2Fserialize001.phpt;h=ac43dce0977613f68eea534e0775835c38fe63cc;hp=2e06afe4f7c3bde0109b000172d8bef2f08ca581;hb=cd2f5afaff5794214ec3a784d48b9afce41764bf;hpb=575f4ce7a82c2c2bf4fb597f6a3a3de077403910 diff --git a/tests/serialize001.phpt b/tests/serialize001.phpt index 2e06afe..ac43dce 100644 --- a/tests/serialize001.phpt +++ b/tests/serialize001.phpt @@ -1,20 +1,13 @@ --TEST-- serialization --SKIPIF-- - + --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 +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"))); - } } } ?>