From ee8525569b719078876c4e82303704250f62b06d Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 9 Sep 2014 09:24:08 +0200 Subject: [PATCH] add test for client's once & wait with events --- package.xml | 1 + tests/client016.phpt | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 tests/client016.phpt 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 -- 2.30.2