-
Notifications
You must be signed in to change notification settings - Fork 25
Empty testcase - Database error #135
Comments
Hi @do-web, Thank you for your issue. As you don't tell anything about how you run your functional test, I fear it is quite difficult to help here. But the testing-framework doesn't know anything about your .env file by default. |
ok, but why does it try to establish a database connection?
|
Hi @do-web, Because database connection is needed to be set up for functional testing. |
How can i load the real db instance from typo3 in the test? |
This isn't possible due to functional testing is designed in TYPO3. The functional tests are always executed in an own instance with an own database being set up. You need to provide the data your tests expect to find in the database by using ->importDataSet() within your setUp method. |
And if is use the normal UnitTestCase? |
Maybe you want to share what you want to test so I can help you? Not sure what you need to do so it's hard to tell which approach to choose. |
I have create a empty test case with typo3 9.x with composer and ddev and iam getting an error:
Maybe the .env is not loaded here with the database config?
The text was updated successfully, but these errors were encountered: