Neos\Flow\Tests\Unit\Mvc\Controller\MvcPropertyMappingConfigurationServiceTest::initializePropertyMappingConfigurationSetsModificationAllowedIfIdentityPropertyIsSet PHP Method

initializePropertyMappingConfigurationSetsModificationAllowedIfIdentityPropertyIsSet() public method

    public function initializePropertyMappingConfigurationSetsModificationAllowedIfIdentityPropertyIsSet()
    {
        $trustedProperties = ['foo' => ['__identity' => 1, 'nested' => ['__identity' => 1]]];
        $arguments = $this->initializePropertyMappingConfiguration($trustedProperties);
        $propertyMappingConfiguration = $arguments->getArgument('foo')->getPropertyMappingConfiguration();
        $this->assertTrue($propertyMappingConfiguration->getConfigurationValue(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED));
        $this->assertNull($propertyMappingConfiguration->getConfigurationValue(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED));
        $this->assertFalse($propertyMappingConfiguration->shouldMap('someProperty'));
        $this->assertTrue($propertyMappingConfiguration->forProperty('nested')->getConfigurationValue(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED));
        $this->assertNull($propertyMappingConfiguration->forProperty('nested')->getConfigurationValue(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED));
        $this->assertFalse($propertyMappingConfiguration->forProperty('nested')->shouldMap('someProperty'));
    }