/** * @test * @dataProvider canConvertFromDataProvider */ public function canConvertFromTests($targetType, $expectedResult) { $actualResult = $this->converter->canConvertFrom(array(), $targetType); if ($expectedResult === true) { $this->assertTrue($actualResult); } else { $this->assertFalse($actualResult); } }
/** * @inheritdoc */ public function getTypeOfChildProperty($targetType, $propertyName, PropertyMappingConfigurationInterface $configuration) { return $this->typedArrayConverter->getSourceChildPropertiesToBeConverted($targetType, $propertyName, $configuration); }
/** * @test */ public function getSourceChildPropertiesToBeConvertedShouldReturnEmptyArray() { $this->assertEquals([], $this->converter->getSourceChildPropertiesToBeConverted('')); }