I setup a config/database.php
which is a duplicate of the original project for my PHPUnit test.
when I run the tests, I receive this error.
using OC v2
1) Voilaah\Astar\Tests\APITest::testItSavesIndustry
Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1 no such table: voilaah_astar_industries (SQL: select count(*) as aggregate from "voilaah_astar_industries" where "name" = name)
happy to make it work without my database as well, but I am facing the same error
phpunit.xml file
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="../../../modules/system/tests/bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
>
<testsuites>
<testsuite name="Plugin Unit Test Suite">
<directory>./tests</directory>
</testsuite>
</testsuites>
<php>
<env name="APP_ENV" value="testing" />
<env name="CACHE_DRIVER" value="array" />
<env name="SESSION_DRIVER" value="array" />
<env name="ACTIVE_THEME" value="accm2022" />
<env name="CONVERT_LINE_ENDINGS" value="true" />
<env name="CMS_ROUTE_CACHE" value="true" />
<env name="CMS_TWIG_CACHE" value="false" />
<env name="ENABLE_CSRF" value="false" />
<env name="DB_CONNECTION" value="sqlite" />
<env name="DB_DATABASE" value=":memory:" />
</php>
</phpunit>