mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Merge remote-tracking branch 'github-igorw/feature/functional-tests' into develop
* github-igorw/feature/functional-tests: [feature/functional-tests] Introduce bootstrap method [feature/functional-tests] Make sure functional tests only install once
This commit is contained in:
commit
72eb1ad8cc
1 changed files with 10 additions and 2 deletions
|
@ -43,6 +43,13 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||||
return $this->client->request($method, $this->root_url . $path);
|
return $this->client->request($method, $this->root_url . $path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// bootstrap, called after board is set up
|
||||||
|
// once per test case class
|
||||||
|
// test cases can override this
|
||||||
|
protected function bootstrap()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function __construct($name = NULL, array $data = array(), $dataName = '')
|
public function __construct($name = NULL, array $data = array(), $dataName = '')
|
||||||
{
|
{
|
||||||
parent::__construct($name, $data, $dataName);
|
parent::__construct($name, $data, $dataName);
|
||||||
|
@ -51,10 +58,11 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||||
'phpbb_functional_test_case' => array('config', 'already_installed'),
|
'phpbb_functional_test_case' => array('config', 'already_installed'),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!self::$already_installed)
|
if (!static::$already_installed)
|
||||||
{
|
{
|
||||||
$this->install_board();
|
$this->install_board();
|
||||||
self::$already_installed = true;
|
$this->bootstrap();
|
||||||
|
static::$already_installed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue