Bug #84653
closedUnit test fails when PHP yaml extension is loaded
0%
Description
When the yaml extension for PHP is loaded, the following unit test will fail
TYPO3\CMS\Form\Tests\Unit\Mvc\Configuration\YamlSourceTest::loadThrowsExceptionIfFileToLoadIsNotValidYamlUsePhpExtensionParser
The unit test is skipped when the yaml extension is not loaded. When it is loaded, that constructor for class YamlSource is set to be skipped in the mock object. But the constructor contais the check, if PHP yaml extension should be used. Because the yaml extension will not be used for parsing, this is always false. This end up in an incorrect exception.
If constructor is loaded, no exception will be thrown because the invalid yaml file will be successful parsed by yaml_parse().
So the test will not work either way with loaded PHP yaml extension and current fixture for invalid yaml.
Updated by Benni Mack almost 5 years ago
- Category changed from Tests to Form Framework
Updated by Benni Mack over 4 years ago
- Status changed from New to Closed
Hey tim,
we've "fixed" this with the TYPO3 security release in 2018 (Security-Bulletin: TYPO3-CORE-SA-2018-004)