Pinq\Tests\Integration\Collection\SetIndexTest::testThatSettingAnIndexWillOverrideTheElementInTheCollection PHP Метод

testThatSettingAnIndexWillOverrideTheElementInTheCollection() публичный Метод

public testThatSettingAnIndexWillOverrideTheElementInTheCollection ( Pinq\ICollection $collection, array $data )
$collection Pinq\ICollection
$data array
    public function testThatSettingAnIndexWillOverrideTheElementInTheCollection(\Pinq\ICollection $collection, array $data)
    {
        reset($data);
        $key = key($data);
        if ($key === null) {
            return;
        }
        $instance = new \stdClass();
        $collection[$key] = $instance;
        $data[$key] = $instance;
        $this->assertMatches($collection, $data);
    }