Neos\Flow\Tests\Unit\Property\TypeConverter\StringConverterTest::convertFromConvertsDateTimeImmutableObjects PHP Method

convertFromConvertsDateTimeImmutableObjects() public method

    public function convertFromConvertsDateTimeImmutableObjects()
    {
        $date = new \DateTimeImmutable('1980-12-13');
        $propertyMappingConfiguration = new PropertyMappingConfiguration();
        $propertyMappingConfiguration->setTypeConverterOption(StringConverter::class, StringConverter::CONFIGURATION_DATE_FORMAT, 'd.m.Y');
        $this->assertEquals('13.12.1980', $this->converter->convertFrom($date, 'string', [], $propertyMappingConfiguration));
    }