[BUGFIX] Respect wildcard in PropertyConfiguration shouldMap()
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Tests / Unit / Property / PropertyMappingConfigurationTest.php
index ff53200..54fad74 100644 (file)
@@ -154,6 +154,15 @@ class PropertyMappingConfigurationTest extends \TYPO3\CMS\Extbase\Tests\Unit\Bas
                $this->assertEquals('k1a', $this->propertyMappingConfiguration->getTargetPropertyName('k1'));
                $this->assertEquals('k2', $this->propertyMappingConfiguration->getTargetPropertyName('k2'));
        }
+
+       /**
+        * @test
+        */
+       public function shouldMapAllowsArbitraryPropertiesWhenConfiguredWithAsterisk() {
+               $this->propertyMappingConfiguration->forProperty('items.*')->setTypeConverterOptions('someConverter', array('k1' => 'v1'));
+               $configuration = $this->propertyMappingConfiguration->forProperty('items');
+               $this->assertTrue($configuration->shouldMap(uniqid()));
+       }
 }
 
 ?>
\ No newline at end of file