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 #1

Updated by Tim Schreiner about 6 years ago

  • Description updated (diff)
Actions #2

Updated by Benni Mack over 4 years ago

  • Category changed from Tests to Form Framework
Actions #4

Updated by Benni Mack about 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)

Actions

Also available in: Atom PDF