1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 12:03:21 +01:00

[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
This commit is contained in:
Oleg Pudeyev 2012-12-10 06:42:43 -05:00
parent 38d2868ba8
commit 2bc2cb1f6f

View File

@ -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.');
}
if (!self::$already_installed)
{
self::install_board();
self::$already_installed = true;
}
}
public function setUp()