connection->prepare($sql); /** @var StatementPool $statement2 */ $statement2 = yield $this->connection->prepare($sql); $this->assertInstanceOf(StatementPool::class, $statement1); $this->assertInstanceOf(StatementPool::class, $statement2); $this->assertSame($statement1, $statement2); }); } }