The "key" is the sub-property name, and the "value" is the value of the sub-property.
public getSourceChildPropertiesToBeConverted ( mixed $source ) : array |
||
$source | mixed | |
return | array |
/** * @test */ public function getSourceChildPropertiesToBeConvertedReturnsAllPropertiesExceptTheIdentityProperty() { $source = ['k1' => 'v1', '__identity' => 'someIdentity', 'k2' => 'v2']; $expected = ['k1' => 'v1', 'k2' => 'v2']; $this->assertEquals($expected, $this->converter->getSourceChildPropertiesToBeConverted($source)); }
/** * @test */ public function getSourceChildPropertiesToBeConvertedShouldReturnEmptyArray() { $this->assertEquals([], $this->converter->getSourceChildPropertiesToBeConverted('myString')); }
/** * @test */ public function getSourceChildPropertiesToBeConvertedShouldReturnEmptyArray() { $this->assertEmpty($this->converter->getSourceChildPropertiesToBeConverted('something')); }