mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 07:18:08 +02:00
[ticket/10838] separate database used mentioned in unit tests
Separate database used for tests which is deleted each time tests are run information is added to unit tests. PHPBB3-10838
This commit is contained in:
@@ -47,9 +47,11 @@ Database Tests
|
|||||||
By default all tests requiring a database connection will use sqlite. If you
|
By default all tests requiring a database connection will use sqlite. If you
|
||||||
do not have sqlite installed the tests will be skipped. If you wish to run the
|
do not have sqlite installed the tests will be skipped. If you wish to run the
|
||||||
tests on a different database you have to create a test_config.php file within
|
tests on a different database you have to create a test_config.php file within
|
||||||
your tests directory following the same format as phpBB's config.php. An
|
your tests directory following the same format as phpBB's config.php. Testing
|
||||||
example for mysqli can be found below. More information on configuration
|
makes use of a seperate database defined in this config file and before running
|
||||||
options can be found on the wiki (see below).
|
the tests each time this database is deleted. An example for mysqli can be
|
||||||
|
found below. More information on configuration options can be found on the
|
||||||
|
wiki (see below).
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$dbms = 'mysqli';
|
$dbms = 'mysqli';
|
||||||
@@ -129,11 +131,9 @@ local web server. As of PHP 5.4 a builtin webserver is available. If you are
|
|||||||
on PHP 5.3 you will also need to supply the URL to a webserver of your own in
|
on PHP 5.3 you will also need to supply the URL to a webserver of your own in
|
||||||
the 'tests/test_config.php' file. This is as simple as defining the
|
the 'tests/test_config.php' file. This is as simple as defining the
|
||||||
'$phpbb_functional_url', which contains the URL for the directory containing
|
'$phpbb_functional_url', which contains the URL for the directory containing
|
||||||
the board. Make sure you include the trailing slash. Testing makes use of a
|
the board. Make sure you include the trailing slash. Note that without extensive
|
||||||
seperate database defined in this config file and before running the tests
|
changes to the test framework, you cannot use a board outside of the repository
|
||||||
each time this database is deleted. Note that without extensive changes to the
|
on which to run tests.
|
||||||
test framework, you cannot use a board outside of the repository on which to
|
|
||||||
run tests.
|
|
||||||
|
|
||||||
$phpbb_functional_url = 'http://localhost/phpBB3/';
|
$phpbb_functional_url = 'http://localhost/phpBB3/';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user