Tests on Windows fail with "Syntax error, malformed JSON"
ravage84 opened this issue · comments
Marc Würth commented
- PHPMD version: 957fe4b
- PHP Version: 7.4.33
- Installation type: composer
- Operating System / Distribution & Version: (Windows 10 / AppVeyor
Current Behavior
There were 2 failures:
1) PHPMD\Renderer\SARIFRendererTest::testRendererCreatesExpectedNumberOfJsonElements
Failed asserting that '{\n "version": "2.1.0",\n ... ]\n}\n' is valid JSON (Syntax error, malformed JSON).
C:\projects\phpmd\src\test\php\PHPMD\AbstractStaticTest.php:188
C:\projects\phpmd\src\test\php\PHPMD\Renderer\SARIFRendererTest.php:78
phpvfscomposer://C:\projects\phpmd\vendor\phpunit\phpunit\phpunit:51
2) PHPMD\Renderer\SARIFRendererTest::testRendererAddsProcessingErrorsToJsonReport
Failed asserting that '{\n "version": "2.1.0",\n ... ]\n}\n' is valid JSON (Syntax error, malformed JSON).
C:\projects\phpmd\src\test\php\PHPMD\AbstractStaticTest.php:188
C:\projects\phpmd\src\test\php\PHPMD\Renderer\SARIFRendererTest.php:119
phpvfscomposer://C:\projects\phpmd\vendor\phpunit\phpunit\phpunit:51
FAILURES!
Tests: 714, Assertions: 943, Failures: 2.
Command exited with code 1
https://ci.appveyor.com/project/phpmd/phpmd/builds/47150788
Reproduced on my local Win 10.
Expected Behavior
Tests should pass on Windows, too.
Steps To Reproduce:
- Checkout with PhpStorm (likely irrelevant)
- Composer Installation through PhpStorm (likely irrelevant)
composer test
(likely irrelevant)
Checks before submitting
Done
Tobias van Beek commented
It did start with merging #865
see: https://ci.appveyor.com/project/phpmd/phpmd/builds/38745268 ( or scroll down in https://ci.appveyor.com/project/phpmd/phpmd/history )
It shows that we didn't have this feedback for a long time