public function testArray() { $arraySource = new ArrayValue(); $arraySource->addValue("a", new ScalarValue(1)); $arraySource->addValue(2, new ScalarValue("b")); $this->assertEquals(["a" => 1, 2 => "b"], $this->getRebuiltResultOf($arraySource)); }
public function mapToObject(array $previouslyMappedObject) { $ArrayValue = new ArrayValue(); foreach ($previouslyMappedObject as $index => $mappedValueSource) { $ArrayValue->addValue($index, $this->actualMapper->mapToObject($mappedValueSource)); } return $ArrayValue; }