When developing Kernel test, it was found that after applying the patch, that the time to run Kernel test was reduced by between 25% and 33%. Before applying the patch, the code created a file database called ':memory:' in the application root directory and to remove it and not use the SQLite in memory database functionality.
Here is example XML element in phpunit.xml for file based SQLite database in the /tmp directory called test.sqlite.<env name="SIMPLETEST_DB" value="sqlite://localhost//tmp/test.sqlite"/>
Here is example XML element in phpunit.xml for file based SQLite database in the application root directory called test.sqlite.<env name="SIMPLETEST_DB" value="sqlite://localhost/test.sqlite"/>
Here is example XML element in phpunit.xml for in memory SQLite database<env name="SIMPLETEST_DB" value="sqlite://localhost/:memory:"/>;
See http://php.net/manual/en/ref.pdo-sqlite.connection.php for more information about using a in memory database.
Please note
- In memory database is not shared between the client and server programs when running Functional or Functional-JavaScript unit tests and hence failures.
- A database is not needed for Unit tests.