Metabor\KeyValue\CompositeTest::testReturnsKeyValueWhenAllContainedArrayAccessObjectsHaveThisKeyValuePair1 PHP Метод

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

    public function testReturnsKeyValueWhenAllContainedArrayAccessObjectsHaveThisKeyValuePair1()
    {
        $key = 'Key';
        $value = 'Value';
        $array = array($key => $value);
        $composite = new Composite();
        $keyValue1 = new \ArrayIterator($array);
        $composite->attach($keyValue1);
        $keyValue2 = new \ArrayIterator($array);
        $composite->attach($keyValue2);
        $this->assertEquals($value, $composite[$key]);
    }