aboutsummaryrefslogtreecommitdiffstats
path: root/tests/session
diff options
context:
space:
mode:
authorAndy Chase <asperous2@gmail.com>2013-07-01 16:44:22 -0700
committerAndy Chase <asperous2@gmail.com>2013-07-05 14:09:56 -0700
commit17890a308bbecd295c6ebb92d55fc39e68aae34e (patch)
treece7ce3f56da4f4e970eac1b6b4f0e2d660cee46d /tests/session
parent2f92c903e7f42978e01d09287e93d572f5e302c9 (diff)
downloadforums-17890a308bbecd295c6ebb92d55fc39e68aae34e.tar
forums-17890a308bbecd295c6ebb92d55fc39e68aae34e.tar.gz
forums-17890a308bbecd295c6ebb92d55fc39e68aae34e.tar.bz2
forums-17890a308bbecd295c6ebb92d55fc39e68aae34e.tar.xz
forums-17890a308bbecd295c6ebb92d55fc39e68aae34e.zip
[ticket/11620] Add ipv6 test cases and remove extra arguments.
PHPBB3-11620
Diffstat (limited to 'tests/session')
-rw-r--r--tests/session/extract_hostname_test.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/session/extract_hostname_test.php b/tests/session/extract_hostname_test.php
index 6978b5286f..cd71f82b17 100644
--- a/tests/session/extract_hostname_test.php
+++ b/tests/session/extract_hostname_test.php
@@ -32,8 +32,12 @@ class phpbb_session_extract_hostname_test extends phpbb_database_test_case
{
return array (
// [Input] $host, $server_name_config, $cookie_domain_config, [Expected] $output
- // If host is ip use that ipv4
+ // If host is ip use that
+ // ipv4
array('127.0.0.1', 'skipped.org', 'skipped.org', '127.0.0.1'),
+ // ipv6
+ array('::1', 'skipped.org', 'skipped.org', ':'),
+ array('2002::3235:51f9', 'skipped.org', 'skipped.org', '2002::3235'),
// If no host but server name matches cookie_domain use that
array('', 'example.org', 'example.org', 'example.org'),
// If there is a host uri use that
@@ -49,8 +53,6 @@ class phpbb_session_extract_hostname_test extends phpbb_database_test_case
function test_extract_current_hostname($host, $server_name_config, $cookie_domain_config, $expected)
{
$output = $this->session_facade->extract_current_hostname(
- $this->db,
- $this->session_factory,
$host,
$server_name_config,
$cookie_domain_config