summaryrefslogtreecommitdiff
path: root/server/vendor/guzzlehttp/promises/tests/Thennable.php
diff options
context:
space:
mode:
Diffstat (limited to 'server/vendor/guzzlehttp/promises/tests/Thennable.php')
-rw-r--r--server/vendor/guzzlehttp/promises/tests/Thennable.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/server/vendor/guzzlehttp/promises/tests/Thennable.php b/server/vendor/guzzlehttp/promises/tests/Thennable.php
new file mode 100644
index 0000000..398954d
--- /dev/null
+++ b/server/vendor/guzzlehttp/promises/tests/Thennable.php
@@ -0,0 +1,24 @@
+<?php
+namespace GuzzleHttp\Promise\Tests;
+
+use GuzzleHttp\Promise\Promise;
+
+class Thennable
+{
+ private $nextPromise = null;
+
+ public function __construct()
+ {
+ $this->nextPromise = new Promise();
+ }
+
+ public function then(callable $res = null, callable $rej = null)
+ {
+ return $this->nextPromise->then($res, $rej);
+ }
+
+ public function resolve($value)
+ {
+ $this->nextPromise->resolve($value);
+ }
+}