/** * */ public function testReindex() { $data = ['foo' => 'bar']; $map = ['foo' => 'baz']; $expected = ['foo' => 'bar', 'baz' => 'bar']; $this->assertEquals($expected, Transform::reindex($data, $map)); $expected = ['baz' => 'bar']; $this->assertEquals($expected, Transform::reindex($data, $map, false)); }
/** * {@inheritDoc} */ public function present(Media $Media) { return $Media->setProperties(Transform::reindex($Media->properties(), $this->_mapping)); }