@@ -98,6 +98,12 @@ public function testArgumentSupport(string $foo, int $bar, bool $baz)
9898 }
9999
100100 public function testSetTimeout (): \Generator
101+ {
102+ $ this ->setTimeout (100 );
103+ $ this ->assertNull (yield new Delayed (50 ));
104+ }
105+
106+ public function testSetTimeoutWithCoroutine (): \Generator
101107 {
102108 $ this ->setTimeout (100 );
103109
@@ -107,6 +113,16 @@ public function testSetTimeout(): \Generator
107113 yield new Delayed (200 );
108114 }
109115
116+ public function testSetTimeoutWithWatcher ()
117+ {
118+ $ this ->setTimeout (100 );
119+
120+ $ this ->expectException (AssertionFailedError::class);
121+ $ this ->expectExceptionMessage ('Expected test to complete before 100ms time limit ' );
122+
123+ Loop::delay (200 , function () {});
124+ }
125+
110126 public function testSetMinimumRunTime (): \Generator
111127 {
112128 $ this ->setMinimumRuntime (100 );
@@ -126,6 +142,14 @@ public function testSetMinimumRunTimeWithWatchersOnly()
126142 Loop::delay (100 , $ this ->createCallback (1 ));
127143 }
128144
145+ public function testUnresolvedPromise (): Promise
146+ {
147+ $ this ->expectException (AssertionFailedError::class);
148+ $ this ->expectExceptionMessage ('Loop stopped without resolving promise or coroutine returned from test method ' );
149+
150+ return (new Deferred )->promise ();
151+ }
152+
129153 public function testCreateCallback ()
130154 {
131155 $ mock = $ this ->createCallback (1 , function (int $ value ): int {
0 commit comments