Neos\Flow\Tests\Unit\ObjectManagement\ObjectSerializerTest::buildStorageArrayCreatesTheCorrectArrayForAnArrayProperty PHP Method

buildStorageArrayCreatesTheCorrectArrayForAnArrayProperty() public method

    public function buildStorageArrayCreatesTheCorrectArrayForAnArrayProperty()
    {
        $objectSerializer = $this->getAccessibleMock(\Neos\Flow\ObjectManagement\ObjectSerializer::class, array('dummy'), array(), '', false);
        $expectedArray = ['key1' => [ObjectSerializer::TYPE => 'simple', ObjectSerializer::VALUE => 1], 'key2' => [ObjectSerializer::TYPE => 'simple', ObjectSerializer::VALUE => 2], 'key3' => [ObjectSerializer::TYPE => 'array', ObjectSerializer::VALUE => ['key4' => [ObjectSerializer::TYPE => 'simple', ObjectSerializer::VALUE => 4], 'key5' => [ObjectSerializer::TYPE => 'simple', ObjectSerializer::VALUE => 5]]]];
        $arrayProperty = ['key1' => 1, 'key2' => 2, 'key3' => ['key4' => 4, 'key5' => 5]];
        $this->assertSame($expectedArray, $objectSerializer->_call('buildStorageArrayForArrayProperty', $arrayProperty));
    }
ObjectSerializerTest