To allow execution of the tests with different configurations without having
to use the test_config.php file, environment variables of the form
PHPBB_TEST_<name> can now be used, e.g. PHPBB_TEST_DBMS to set the variables
otherwise expected in test_config.php
PHPBB3-9868
Tests are run with sqlite by default now anyway, so in the majority of cases
the error message explaining how to set up database test running will not be
displayed anyway. Database tests are now generally simply skipped if no
configuration can be found. The RUNNING_TESTS.txt file explains how to set
them up however, and more info is available on the wiki.
The get_database_config method was moved from test_case_helpers to
database_test_case because it has no general purpose.
PHPBB3-9868
Calling initialisation to then use the member directly seems more
complicated than just having a method that returns the instance or
creates it if necessary.
PHPBB3-9868
The database base test will need a few more changes to run on all the
databases we support. But those really need to be made on a system where
they run and can be tested. Patches welcome!
There is now a phpbb_database_test_case which can be used as a base class for tests that require database access. You have to set up a test_config.php file in your tests/ directory containing host, user, pass etc.
Extra test functionality has been moved to phpbb_test_case_helpers to provide the same functionality in database tests and regular tests without duplicating the code. This is achieved through delegation of method calls.