mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-13 20:28:44 +01:00
[ticket/10678] Lowercase class name, adjust comment width
PHPBB3-10678
This commit is contained in:
parent
9bb2785da0
commit
ceacb63abf
@ -36,8 +36,9 @@ found on the wiki (see below).
|
||||
$dbuser = 'user';
|
||||
$dbpasswd = 'password';
|
||||
|
||||
Alternatively you can specify parameters in the environment, so e.g. the following
|
||||
will run phpunit with the same parameters as in the shown test_config.php file:
|
||||
Alternatively you can specify parameters in the environment, so e.g. the
|
||||
following will run phpunit with the same parameters as in the shown
|
||||
test_config.php file:
|
||||
|
||||
$ PHPBB_TEST_DBMS='mysqli' PHPBB_TEST_DBHOST='localhost' \
|
||||
PHPBB_TEST_DBNAME='database' PHPBB_TEST_DBUSER='user' \
|
||||
@ -46,9 +47,10 @@ will run phpunit with the same parameters as in the shown test_config.php file:
|
||||
Special Database Cases
|
||||
----------------------
|
||||
In order to run tests on some of the databases that we support, it will be
|
||||
necessary to provide a custom DSN string in test_config.php. This is only needed for
|
||||
MSSQL 2000+ (PHP module), MSSQL via ODBC, and Firebird when PDO_Firebird does not work
|
||||
on your system (https://bugs.php.net/bug.php?id=61183). The variable must be named $custom_dsn.
|
||||
necessary to provide a custom DSN string in test_config.php. This is only
|
||||
needed for MSSQL 2000+ (PHP module), MSSQL via ODBC, and Firebird when
|
||||
PDO_Firebird does not work on your system
|
||||
(https://bugs.php.net/bug.php?id=61183). The variable must be named $custom_dsn.
|
||||
|
||||
Examples:
|
||||
Firebird using http://www.firebirdsql.org/en/odbc-driver/
|
||||
@ -57,15 +59,17 @@ $custom_dsn = "Driver={Firebird/InterBase(r) driver};dbname=$dbhost:$dbname";
|
||||
MSSQL
|
||||
$custom_dsn = "Driver={SQL Server Native Client 10.0};Server=$dbhost;Database=$dbname";
|
||||
|
||||
The other fields in test_config.php should be filled out as you would normally to connect
|
||||
to that database in phpBB.
|
||||
The other fields in test_config.php should be filled out as you would normally
|
||||
to connect to that database in phpBB.
|
||||
|
||||
Additionally, you will need to be running the DbUnit fork from https://github.com/phpbb/dbunit/tree/phpbb.
|
||||
Additionally, you will need to be running the DbUnit fork from
|
||||
https://github.com/phpbb/dbunit/tree/phpbb.
|
||||
|
||||
Running
|
||||
=======
|
||||
|
||||
Once the prerequisites are installed, run the tests from the project root directory (above phpBB):
|
||||
Once the prerequisites are installed, run the tests from the project root
|
||||
directory (above phpBB):
|
||||
|
||||
$ phpunit
|
||||
|
||||
@ -73,8 +77,8 @@ Slow tests
|
||||
--------------
|
||||
Certain tests, such as the UTF-8 normalizer or the DNS tests tend to be slow.
|
||||
Thus these tests are in the `slow` group, which is excluded by default. You can
|
||||
enable slow tests by copying the phpunit.xml.all file to phpunit.xml. If you only
|
||||
want the slow tests, run:
|
||||
enable slow tests by copying the phpunit.xml.all file to phpunit.xml. If you
|
||||
only want the slow tests, run:
|
||||
|
||||
$ phpunit --group slow
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
*
|
||||
* This is used in the custom PHPUnit ODBC driver
|
||||
*/
|
||||
class phpbb_database_connection_ODBC_PDO_wrapper extends PDO
|
||||
class phpbb_database_connection_odbc_pdo_wrapper extends PDO
|
||||
{
|
||||
// Name of the driver being used (i.e. mssql, firebird)
|
||||
public $driver = '';
|
||||
|
@ -97,13 +97,13 @@ class phpbb_database_test_connection_manager
|
||||
{
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
$this->pdo = new phpbb_database_connection_ODBC_PDO_wrapper('mssql', 0, $dsn, $this->config['dbuser'], $this->config['dbpasswd']);
|
||||
$this->pdo = new phpbb_database_connection_odbc_pdo_wrapper('mssql', 0, $dsn, $this->config['dbuser'], $this->config['dbpasswd']);
|
||||
break;
|
||||
|
||||
case 'firebird':
|
||||
if (!empty($this->config['custom_dsn']))
|
||||
{
|
||||
$this->pdo = new phpbb_database_connection_ODBC_PDO_wrapper('firebird', 0, $dsn, $this->config['dbuser'], $this->config['dbpasswd']);
|
||||
$this->pdo = new phpbb_database_connection_odbc_pdo_wrapper('firebird', 0, $dsn, $this->config['dbuser'], $this->config['dbpasswd']);
|
||||
break;
|
||||
}
|
||||
// Fall through if they're using the firebird PDO driver and not the generic ODBC driver
|
||||
|
Loading…
x
Reference in New Issue
Block a user