Project

General

Profile

Actions

Bug #84653

closed

Unit test fails when PHP yaml extension is loaded

Added by Tim Schreiner about 6 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2018-04-07
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Actions

Also available in: Atom PDF