‪TYPO3CMS  10.4
PropertyMappingConfigurationBuilderTest.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
20 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
21 
26 {
31 
32  protected function ‪setUp(): void
33  {
34  parent::setUp();
35  $this->propertyMappingConfigurationBuilder = new ‪PropertyMappingConfigurationBuilder();
36  }
37 
42  {
43  $defaultConfiguration = $this->propertyMappingConfigurationBuilder->build();
44  self::assertTrue($defaultConfiguration->getConfigurationValue(PersistentObjectConverter::class, ‪PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED));
45  self::assertTrue($defaultConfiguration->getConfigurationValue(PersistentObjectConverter::class, ‪PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED));
46 
47  self::assertNull($defaultConfiguration->getConfigurationFor('foo')->getConfigurationValue(PersistentObjectConverter::class, ‪PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED));
48  self::assertNull($defaultConfiguration->getConfigurationFor('foo')->getConfigurationValue(PersistentObjectConverter::class, ‪PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED));
49  }
50 }
‪TYPO3\CMS\Extbase\Tests\Unit\Property\PropertyMappingConfigurationBuilderTest\getTargetPropertyNameShouldReturnTheUnmodifiedPropertyNameWithoutConfiguration
‪getTargetPropertyNameShouldReturnTheUnmodifiedPropertyNameWithoutConfiguration()
Definition: PropertyMappingConfigurationBuilderTest.php:40
‪TYPO3\CMS\Extbase\Tests\Unit\Property\PropertyMappingConfigurationBuilderTest\setUp
‪setUp()
Definition: PropertyMappingConfigurationBuilderTest.php:31
‪TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter\CONFIGURATION_CREATION_ALLOWED
‪const CONFIGURATION_CREATION_ALLOWED
Definition: PersistentObjectConverter.php:52
‪TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter
Definition: PersistentObjectConverter.php:43
‪TYPO3\CMS\Extbase\Tests\Unit\Property
‪TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter\CONFIGURATION_MODIFICATION_ALLOWED
‪const CONFIGURATION_MODIFICATION_ALLOWED
Definition: PersistentObjectConverter.php:47
‪TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationBuilder
Definition: PropertyMappingConfigurationBuilder.php:26
‪TYPO3\CMS\Extbase\Tests\Unit\Property\PropertyMappingConfigurationBuilderTest\$propertyMappingConfigurationBuilder
‪TYPO3 CMS Extbase Property PropertyMappingConfigurationBuilder $propertyMappingConfigurationBuilder
Definition: PropertyMappingConfigurationBuilderTest.php:29
‪TYPO3\CMS\Extbase\Tests\Unit\Property\PropertyMappingConfigurationBuilderTest
Definition: PropertyMappingConfigurationBuilderTest.php:26