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