diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2012-12-10 06:42:43 -0500 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2012-12-10 06:42:43 -0500 |
commit | 2bc2cb1f6f78ef8cc2037941501d5389af009cd7 (patch) | |
tree | af20b38b2c088cc9fcba03d290dd2b57f406dcf2 /tests | |
parent | 38d2868ba8db0f6e24fdfb7bbdfef4925a97770c (diff) | |
download | forums-2bc2cb1f6f78ef8cc2037941501d5389af009cd7.tar forums-2bc2cb1f6f78ef8cc2037941501d5389af009cd7.tar.gz forums-2bc2cb1f6f78ef8cc2037941501d5389af009cd7.tar.bz2 forums-2bc2cb1f6f78ef8cc2037941501d5389af009cd7.tar.xz forums-2bc2cb1f6f78ef8cc2037941501d5389af009cd7.zip |
[ticket/10491] Install board once per test run.
This is how things used to be. Installing for each test class brings
3-4x performance penalty compared to installing once for the entire
test run. However, with a single installation for all tests an
individual test can see different data when it is invoked by itself
vs when it is executed as part of the entire test suite.
PHPBB3-10491
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_framework/phpbb_functional_test_case.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index 66f4b6db65..1e835fcc35 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -31,6 +31,7 @@ class phpbb_functional_test_case extends phpbb_test_case protected $lang = array(); static protected $config = array(); + static protected $already_installed = false; static public function setUpBeforeClass() { @@ -43,7 +44,11 @@ class phpbb_functional_test_case extends phpbb_test_case self::markTestSkipped('phpbb_functional_url was not set in test_config and wasn\'t set as PHPBB_FUNCTIONAL_URL environment variable either.'); } - self::install_board(); + if (!self::$already_installed) + { + self::install_board(); + self::$already_installed = true; + } } public function setUp() |