1, 'two' => 2, 'three' => 3]; $promises = [ 'one' => asyncValue(20, 1), 'two' => asyncValue(30, 2), 'three' => asyncValue(10, 3), ]; self::assertEquals($expected, await(Promise\all($promises))); } public function testNonPromise(): void { $this->expectException(\TypeError::class); Promise\all([1]); } }