public function testToPairs() { $obj1 = new \stdClass(); $obj2 = new \stdClass(); $pairs = [[$obj1, 'foo'], [$obj2, 'bar'], [12, $obj1]]; $dict = Dictionary::fromPairs($pairs); $this->assertEquals($pairs, $dict->toPairs()); }