diff options
| author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-07-04 11:19:10 -0500 |
|---|---|---|
| committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-07-04 11:19:10 -0500 |
| commit | 35b628f737014eec0872ed7d0d140f11621af261 (patch) | |
| tree | a84745e078cfa8078229739b7fa851bae946ceb8 /tests/session | |
| parent | b7ede06835ba784b81365946f057adf75ae7592b (diff) | |
| parent | b3487b3167632f47d98eef25692924aa7ab25863 (diff) | |
| download | forums-35b628f737014eec0872ed7d0d140f11621af261.tar forums-35b628f737014eec0872ed7d0d140f11621af261.tar.gz forums-35b628f737014eec0872ed7d0d140f11621af261.tar.bz2 forums-35b628f737014eec0872ed7d0d140f11621af261.tar.xz forums-35b628f737014eec0872ed7d0d140f11621af261.zip | |
Merge branch 'develop' of https://github.com/phpbb/phpbb3 into feature/twig
# By Joseph Warner (44) and others
# Via Joas Schilling (4) and others
* 'develop' of https://github.com/phpbb/phpbb3: (63 commits)
[ticket/11617] Remove spaces and tabs from empty lines
[ticket/11617] Missing U_ACTION in acp_captcha.php
[feature/auth-refactor] Fix code style issue
[feature/auth-refactor] Fix comment grammar
[feature/auth-refactor] Fix the actual cause of test failures
[feature/auth-refactor] A possible fix for the functional test failures
[ticket/11566] Subsilver template error displayed after table headers
[ticket/11566] Remove extra pair of brackets from conditional statement
[ticket/11566] Check that guest doesn't have reporting permission by default
[ticket/11566] Add captcha to report post template in subsilver
[ticket/11566] Use the new constant CONFIRM_REPORT for captcha init
[ticket/11566] Rename var to $visual_confirmation_response
[ticket/11566] Revert forum permission changes
[ticket/11566] Use language variable instead of hardcode
[ticket/11566] add tests for reporting post
[ticket/11566] add captcha reset and hidden fields
[ticket/11566] display error instead of trigger_error
[ticket/11566] add error in template
[ticket/11566] add error functionality
[ticket/11566] add interface for captcha
...
Diffstat (limited to 'tests/session')
| -rw-r--r-- | tests/session/continue_test.php | 13 | ||||
| -rw-r--r-- | tests/session/creation_test.php | 13 |
2 files changed, 26 insertions, 0 deletions
diff --git a/tests/session/continue_test.php b/tests/session/continue_test.php index ad78d92299..e5a7f7a4a1 100644 --- a/tests/session/continue_test.php +++ b/tests/session/continue_test.php @@ -53,7 +53,20 @@ class phpbb_session_continue_test extends phpbb_database_test_case */ public function test_session_begin_valid_session($session_id, $user_id, $user_agent, $ip, $expected_sessions, $expected_cookies, $message) { + 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_factory->set_cookies(array( '_sid' => $session_id, diff --git a/tests/session/creation_test.php b/tests/session/creation_test.php index 6e61f085a6..fde76d6b06 100644 --- a/tests/session/creation_test.php +++ b/tests/session/creation_test.php @@ -20,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); |
