From 26db4c76c6e638d657b1c4dfff0c8e0b05a48906 Mon Sep 17 00:00:00 2001 From: vladar Date: Sat, 3 Dec 2016 04:31:01 +0700 Subject: [PATCH] Fixed tests for PHP7+ --- tests/Executor/Promise/SyncPromiseTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Executor/Promise/SyncPromiseTest.php b/tests/Executor/Promise/SyncPromiseTest.php index f7e9280..7010ee1 100644 --- a/tests/Executor/Promise/SyncPromiseTest.php +++ b/tests/Executor/Promise/SyncPromiseTest.php @@ -218,6 +218,8 @@ class SyncPromiseTest extends \PHPUnit_Framework_TestCase try { $promise->reject('a'); $this->fail('Expected exception not thrown'); + } catch (\Throwable $e) { + $this->assertEquals(SyncPromise::PENDING, $promise->state); } catch (\Exception $e) { $this->assertEquals(SyncPromise::PENDING, $promise->state); }