From: Michael Wallner Date: Thu, 12 Feb 2015 21:44:31 +0000 (+0100) Subject: tests++ X-Git-Tag: RELEASE_2_3_0_RC1~35 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=8d041c32a46d26f2154efdd20c987c8d2b491645;p=m6w6%2Fext-http tests++ --- diff --git a/tests/client023.phpt b/tests/client023.phpt new file mode 100644 index 0000000..b09c2e2 --- /dev/null +++ b/tests/client023.phpt @@ -0,0 +1,39 @@ +--TEST-- +client available options and configuration +--SKIPIF-- + +--FILE-- +getOptions())) { + var_dump($options); +} +$client->setOptions($avail = $client->getAvailableOptions()); +$opt = $client->getOptions(); + +foreach ($avail as $k => $v) { + if (is_array($v)) { + $oo = $opt[$k]; + foreach ($v as $kk => $vv) { + if (isset($vv) && $oo[$kk] !== $vv) { + var_dump([$kk => [$vv, $oo[$kk]]]); + } + } + } else if (isset($v) && $opt[$k] !== $v) { + var_dump([$k => [$v, $opt[$k]]]); + } +} +var_dump($client === $client->configure($client->getAvailableConfiguration())); + +?> +===DONE=== +--EXPECT-- +Test +bool(true) +===DONE=== diff --git a/tests/client024.phpt b/tests/client024.phpt new file mode 100644 index 0000000..27a68b4 --- /dev/null +++ b/tests/client024.phpt @@ -0,0 +1,25 @@ +--TEST-- +client deprecated methods +--SKIPIF-- + +--FILE-- +enableEvents(false); +$client->enablePipelining(false); + +?> +===DONE=== +--EXPECTF-- +Test + +Deprecated: Function http\Client::enableEvents() is deprecated in %sclient024.php on line %d + +Deprecated: Function http\Client::enablePipelining() is deprecated in %sclient024.php on line %d +===DONE===