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:
Nils Adermann 2011-12-14 14:35:20 +01:00
commit 72eb1ad8cc

View file

@ -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;
} }
} }