From 1c9d36615a60dfbe96da5e9866480313415f262d Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Thu, 9 May 2013 19:59:34 +0200 Subject: [ticket/11529] Rename RUNNING_TESTS.txt to RUNNING_TESTS.md PHPBB3-11529 --- tests/RUNNING_TESTS.md | 119 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/RUNNING_TESTS.txt | 119 ------------------------------------------------ 2 files changed, 119 insertions(+), 119 deletions(-) create mode 100644 tests/RUNNING_TESTS.md delete mode 100644 tests/RUNNING_TESTS.txt diff --git a/tests/RUNNING_TESTS.md b/tests/RUNNING_TESTS.md new file mode 100644 index 0000000000..0fa45e7bc4 --- /dev/null +++ b/tests/RUNNING_TESTS.md @@ -0,0 +1,119 @@ +Running Tests +============= + +Prerequisites +============= + +PHPUnit +------- + +phpBB unit tests use the PHPUnit framework (see http://www.phpunit.de for more +information). Version 3.5 or higher is required to run the tests. PHPUnit can +be installed via Composer together with other development dependencies as +follows. + + $ cd phpBB + $ php ../composer.phar install --dev + $ cd .. + +PHP extensions +-------------- + +Unit tests use several PHP extensions that board code does not use. Currently +the following PHP extensions must be installed and enabled to run unit tests: + +- ctype (also a PHPUnit dependency) +- dom (PHPUnit dependency) + +Some of the functionality in phpBB and/or the test suite uses additional +PHP extensions. If these extensions are not loaded, respective tests +will be skipped: + +- apc (APC cache driver) +- bz2 (compress tests) +- interbase, pdo_firebird (Firebird database driver) +- mysql, pdo_mysql (MySQL database driver) +- mysqli, pdo_mysql (MySQLi database driver) +- pdo (any database tests) +- pgsql, pdo_pgsql (PostgreSQL database driver) +- simplexml (any database tests) +- sqlite, pdo_sqlite (SQLite database driver, requires SQLite 2.x support + in pdo_sqlite) +- zlib (compress tests) + +Database Tests +-------------- + +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 +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 +example for mysqli can be found below. More information on configuration +options can be found on the wiki (see below). + + Date: Thu, 9 May 2013 20:06:12 +0200 Subject: [ticket/11529] Format markdown code correctly PHPBB3-11529 --- tests/RUNNING_TESTS.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/RUNNING_TESTS.md b/tests/RUNNING_TESTS.md index 0fa45e7bc4..26a93f0430 100644 --- a/tests/RUNNING_TESTS.md +++ b/tests/RUNNING_TESTS.md @@ -79,14 +79,16 @@ 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. +(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/ -$custom_dsn = "Driver={Firebird/InterBase(r) driver};dbname=$dbhost:$dbname"; + + $custom_dsn = "Driver={Firebird/InterBase(r) driver};dbname=$dbhost:$dbname"; MSSQL -$custom_dsn = "Driver={SQL Server Native Client 10.0};Server=$dbhost;Database=$dbname"; + + $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. -- cgit v1.2.1