setMinimumRuntime(100); $time = 100; $value = "test"; $promise = new Delayed($time, $value); $this->assertSame($value, await($promise)); } public function testReference(): void { $this->setMinimumRuntime(100); $time = 100; $value = "test"; $promise = new Delayed($time, $value); $promise->unreference(); $promise->reference(); await($promise); } }