mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-24 08:10:13 +02:00
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
28 lines
687 B
PHP
28 lines
687 B
PHP
<?php
|
|
/**
|
|
*
|
|
* @package testing
|
|
* @copyright (c) 2013 phpBB Group
|
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
|
*
|
|
*/
|
|
|
|
require_once dirname(__FILE__) . '/../session/testable_factory.php';
|
|
require_once dirname(__FILE__) . '/../session/testable_facade.php';
|
|
|
|
abstract class phpbb_session_test_case extends phpbb_database_test_case
|
|
{
|
|
protected $session_factory;
|
|
protected $session_facade;
|
|
protected $db;
|
|
|
|
function setUp()
|
|
{
|
|
parent::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);
|
|
}
|
|
}
|