diff options
Diffstat (limited to 'tests/session/creation_test.php')
-rw-r--r-- | tests/session/creation_test.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/session/creation_test.php b/tests/session/creation_test.php index bef52c6554..fde76d6b06 100644 --- a/tests/session/creation_test.php +++ b/tests/session/creation_test.php @@ -7,7 +7,6 @@ * */ -require_once dirname(__FILE__) . '/../mock/cache.php'; require_once dirname(__FILE__) . '/testable_factory.php'; class phpbb_session_creation_test extends phpbb_database_test_case @@ -21,7 +20,20 @@ class phpbb_session_creation_test extends phpbb_database_test_case public function test_login_session_create() { + global $phpbb_container, $phpbb_root_path, $phpEx; + $db = $this->new_dbal(); + $config = new phpbb_config(array()); + $request = $this->getMock('phpbb_request'); + $user = $this->getMock('phpbb_user'); + + $auth_provider = new phpbb_auth_provider_db($db, $config, $request, $user, $phpbb_root_path, $phpEx); + $phpbb_container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); + $phpbb_container->expects($this->any()) + ->method('get') + ->with('auth.provider.db') + ->will($this->returnValue($auth_provider)); + $session_factory = new phpbb_session_testable_factory; $session = $session_factory->get_session($db); |