mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/11620] Abstracted session setUp into a test_case class
When defining a database test case with a setUp function, it is important to call the parent's setup function, because that is when the database is setup. PHPBB3-11620
This commit is contained in:
@@ -7,27 +7,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__) . '/testable_facade.php';
|
||||
require_once dirname(__FILE__) . '/../test_framework/phpbb_session_test_case.php';
|
||||
|
||||
class phpbb_session_extract_hostname_test extends phpbb_database_test_case
|
||||
class phpbb_session_extract_hostname_test extends phpbb_session_test_case
|
||||
{
|
||||
public $session_factory;
|
||||
public $db;
|
||||
public $session_facade;
|
||||
|
||||
public function getDataSet()
|
||||
{
|
||||
return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/sessions_empty.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->session_factory = new phpbb_session_testable_factory;
|
||||
$this->db = $this->new_dbal();
|
||||
$this->session_facade =
|
||||
new phpbb_session_testable_facade($this->db, $this->session_factory);
|
||||
}
|
||||
|
||||
static public function extract_current_hostname_data()
|
||||
{
|
||||
return array (
|
||||
|
Reference in New Issue
Block a user