From: Michael Wallner Date: Tue, 9 Sep 2014 07:24:08 +0000 (+0200) Subject: add test for client's once & wait with events X-Git-Tag: RELEASE_2_2_0_RC1~11^2~6 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=ee8525569b719078876c4e82303704250f62b06d;p=m6w6%2Fext-http add test for client's once & wait with events --- diff --git a/package.xml b/package.xml index a4e1b4e..528ca8a 100644 --- a/package.xml +++ b/package.xml @@ -151,6 +151,7 @@ v2: http://dev.iworks.at/ext-http/lcov/ext/http/ + diff --git a/tests/client016.phpt b/tests/client016.phpt new file mode 100644 index 0000000..f50d9bb --- /dev/null +++ b/tests/client016.phpt @@ -0,0 +1,38 @@ +--TEST-- +client once & wait with events +--SKIPIF-- +enableEvents()) + throw new Exception("need events support"); +} catch (Exception $e) { + die("skip ".$e->getMessage()); +} +skip_online_test(); +?> +--FILE-- +enableEvents(true); + $client->enqueue($request); + + while ($client->once()) { + $client->wait(.1); + } + + if (!$client->getResponse()) { + var_dump($client); + } +} +?> +Done +--EXPECT-- +Test +Done