Neos\Flow\Tests\Unit\Property\PropertyMapperTest::convertSkipsUnknownPropertiesIfConfiguredTo PHP Method

convertSkipsUnknownPropertiesIfConfiguredTo() public method

    public function convertSkipsUnknownPropertiesIfConfiguredTo()
    {
        $source = ['firstProperty' => 1, 'secondProperty' => 2];
        $typeConverters = ['array' => ['stdClass' => [10 => $this->getMockTypeConverter('array2object', true, $source, 'integer')]], 'integer' => ['integer' => [10 => $this->getMockTypeConverter('integer2integer')]]];
        $configuration = new PropertyMappingConfiguration();
        $propertyMapper = $this->getAccessibleMock(PropertyMapper::class, ['dummy']);
        $propertyMapper->_set('typeConverters', $typeConverters);
        $propertyMapper->convert($source, 'stdClass', $configuration->allowProperties('firstProperty')->skipUnknownProperties());
        // dummy assertion to avoid PHPUnit warning
        $this->assertTrue(true);
    }