run(function ($reactor) use ($arg) { new Pause($arg, $reactor); }); } public function provideBadMillisecondArgs() { return [ [0], [-1], ]; } public function testPauseYield() { $endReached = false; (new NativeReactor)->run(function ($reactor) use (&$endReached) { $result = (yield new Pause(1, $reactor)); $this->assertNull($result); $endReached = true; }); $this->assertTrue($endReached); } }