From 9a52bd030189280f48a35d3b9e52f9d77071cb5e Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Mon, 3 Jan 2011 22:21:54 +0100 Subject: [task/phpunit-xml] Use phpunit.xml for test suite PHPBB3-9967 --- tests/bootstrap.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/bootstrap.php (limited to 'tests/bootstrap.php') diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 100644 index 0000000000..9683ba0d47 --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1,30 @@ += 6.0.0 we do not need some code +if (version_compare(PHP_VERSION, '6.0.0-dev', '>=')) +{ + define('STRIP', false); +} +else +{ + @set_magic_quotes_runtime(0); + define('STRIP', (get_magic_quotes_gpc()) ? true : false); +} + +require_once $phpbb_root_path . 'includes/constants.php'; + +require_once 'test_framework/phpbb_test_case_helpers.php'; +require_once 'test_framework/phpbb_test_case.php'; +require_once 'test_framework/phpbb_database_test_case.php'; -- cgit v1.2.1 From b720edb05bafb1a5f75da049226c2c8270511f92 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Fri, 7 Jan 2011 00:16:28 +0100 Subject: [task/phpunit-xml] Force error reporting level E_ALL | ~E_DEPRECATED. PHPBB3-9967 --- tests/bootstrap.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/bootstrap.php') diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 9683ba0d47..99f145e427 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -12,6 +12,8 @@ $phpbb_root_path = 'phpBB/'; $phpEx = 'php'; $table_prefix = ''; +error_reporting(E_ALL & ~E_DEPRECATED); + // If we are on PHP >= 6.0.0 we do not need some code if (version_compare(PHP_VERSION, '6.0.0-dev', '>=')) { -- cgit v1.2.1 From 74f537e89d899831c606b9abe218383a4e71408e Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Tue, 4 Jan 2011 17:14:36 +0100 Subject: [task/session-tests] Added tests for the session class. Two first simple tests to check functionality of session_begin and session_create. Added a mock class for the cache as well as a subclass of session which has its cookie handling function mocked out to avoid header sending problems. PHPBB3-9732 --- tests/bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/bootstrap.php') diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 99f145e427..1fba323277 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -10,7 +10,7 @@ define('IN_PHPBB', true); $phpbb_root_path = 'phpBB/'; $phpEx = 'php'; -$table_prefix = ''; +$table_prefix = 'phpbb_'; error_reporting(E_ALL & ~E_DEPRECATED); -- cgit v1.2.1 From 6c7f49f56199a5e4de195731c2d7a8aacd33dd53 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Mon, 14 Feb 2011 00:00:59 +0100 Subject: [task/refactor-db-testcase] Refactor phpbb_database_test_case Move most of the methods to a separate connection manager class. The test case creates a manager to handle database creation, schema loading and more. Most of the methods could be simplified because they can access shared pdo, config and dbms data. PHPBB3-10043 --- tests/bootstrap.php | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/bootstrap.php') diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 1fba323277..c729c6e2d8 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -30,3 +30,4 @@ require_once $phpbb_root_path . 'includes/constants.php'; require_once 'test_framework/phpbb_test_case_helpers.php'; require_once 'test_framework/phpbb_test_case.php'; require_once 'test_framework/phpbb_database_test_case.php'; +require_once 'test_framework/phpbb_database_test_connection_manager.php'; -- cgit v1.2.1 From dec9d243929a08deb054cd836590c2e0d60d14c1 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Mon, 7 Mar 2011 16:25:52 +0100 Subject: [ticket/10040] Ensure the test suite runs on PHP 5.2 without E_DEPRECATED. PHPBB3-10040 --- tests/bootstrap.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/bootstrap.php') diff --git a/tests/bootstrap.php b/tests/bootstrap.php index c729c6e2d8..6f3c93a374 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -12,6 +12,10 @@ $phpbb_root_path = 'phpBB/'; $phpEx = 'php'; $table_prefix = 'phpbb_'; +if (!defined('E_DEPRECATED')) +{ + define('E_DEPRECATED', 8192); +} error_reporting(E_ALL & ~E_DEPRECATED); // If we are on PHP >= 6.0.0 we do not need some code -- cgit v1.2.1