Nimut / testing-framework

TYPO3 testing framework that provides base classes and configuration for PHPUnit tests
GNU General Public License v2.0
52 stars 25 forks source link

Problem with SQLite on PHP 8.0 #149

Open tomasnorre opened 2 years ago

tomasnorre commented 2 years ago

Hi,

I have experienced a problem with nimut/testing-framework and PHP 8.0.14 When I run the PHPUnit command

$ TYPO3_PATH_WEB=$PWD/.Build/Web typo3DatabaseDriver=pdo_sqlite .Build/bin/phpunit -c .Build/vendor/nimut/testing-framework/res/Configuration/FunctionalTests.xml Tests/Functional

I run into an exception, thrown by https://github.com/Nimut/testing-framework/blob/main/src/TestingFramework/TestSystem/AbstractTestSystem.php#L729 as dbname isn't defined.

This is not a problem with PHP 7.4.

If I adjust my command to also include typo3DatabaseName=test it's working like expected.

$ TYPO3_PATH_WEB=$PWD/.Build/Web typo3DatabaseDriver=pdo_sqlite typo3DatabaseName=test .Build/bin/phpunit -c .Build/vendor/nimut/testing-framework/res/Configuration/FunctionalTests.xml Tests/Functional

I haven't found out what the reason for the different behaviour here is. But I would expect it to be something with a default value resolved differently in PHP 8.0.

I'll see if I find the issue and a solution. But for now I wanted to share the information in case others runs into the problem.

lolli42 commented 2 years ago

This should work when using https://github.com/TYPO3/testing-framework