From 5d6295e07d9c9e78556b3da8558afd25c34e5816 Mon Sep 17 00:00:00 2001 From: Niklas Keller Date: Sat, 17 Jun 2017 14:01:05 +0200 Subject: [PATCH] Fix tests --- test/EvReactorTest.php | 8 ++++++++ test/UvReactorTest.php | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/test/EvReactorTest.php b/test/EvReactorTest.php index 07ae785..13223b0 100644 --- a/test/EvReactorTest.php +++ b/test/EvReactorTest.php @@ -39,6 +39,10 @@ class EvReactorTest extends ReactorTest { \Amp\cancel($watcherId); } + /** + * @expectedException \Exception + * @expectedExceptionMessage coroutine error + */ public function testImmediateCoroutineResolutionError() { if (\extension_loaded("xdebug")) { $this->markTestSkipped( @@ -49,6 +53,10 @@ class EvReactorTest extends ReactorTest { } } + /** + * @expectedException \Exception + * @expectedExceptionMessage coroutine error + */ public function testOnErrorFailure() { if (\extension_loaded("xdebug")) { $this->markTestSkipped( diff --git a/test/UvReactorTest.php b/test/UvReactorTest.php index 4dc5414..efc806d 100644 --- a/test/UvReactorTest.php +++ b/test/UvReactorTest.php @@ -23,7 +23,7 @@ class UvReactorTest extends ReactorTest { public function testGetLoop() { $result = \Amp\reactor()->getLoop(); - $this->assertInternalType("resource", $result); + $this->assertTrue(\is_resource($result) || $result instanceof \UVLoop); } public function testOnSignalWatcherKeepAliveRunResult() {