[ticket/11620] Changes for code guidelines consistency

PHPBB3-11620
This commit is contained in:
Andy Chase 2013-07-22 11:13:31 -07:00
parent de2cb59533
commit cc1aef47fb
3 changed files with 15 additions and 13 deletions

View file

@ -32,8 +32,8 @@ class phpbb_session_extract_page_test extends phpbb_session_test_case
'root_script_path' => '/phpBB/', 'root_script_path' => '/phpBB/',
'page' => 'index.php', 'page' => 'index.php',
'forum' => 0, 'forum' => 0,
) ),
) , ),
array( array(
'./', './',
'/phpBB/ucp.php', '/phpBB/ucp.php',
@ -47,8 +47,8 @@ class phpbb_session_extract_page_test extends phpbb_session_test_case
'root_script_path' => '/phpBB/', 'root_script_path' => '/phpBB/',
'page' => 'ucp.php?mode=login', 'page' => 'ucp.php?mode=login',
'forum' => 0, 'forum' => 0,
) ),
) , ),
array( array(
'./', './',
'/phpBB/ucp.php', '/phpBB/ucp.php',
@ -62,8 +62,8 @@ class phpbb_session_extract_page_test extends phpbb_session_test_case
'root_script_path' => '/phpBB/', 'root_script_path' => '/phpBB/',
'page' => 'ucp.php?mode=register', 'page' => 'ucp.php?mode=register',
'forum' => 0, 'forum' => 0,
) ),
) , ),
array( array(
'./', './',
'/phpBB/ucp.php', '/phpBB/ucp.php',
@ -77,8 +77,8 @@ class phpbb_session_extract_page_test extends phpbb_session_test_case
'root_script_path' => '/phpBB/', 'root_script_path' => '/phpBB/',
'page' => 'ucp.php?mode=register', 'page' => 'ucp.php?mode=register',
'forum' => 0, 'forum' => 0,
) ),
) , ),
array( array(
'./../', './../',
'/phpBB/adm/index.php', '/phpBB/adm/index.php',
@ -93,8 +93,8 @@ class phpbb_session_extract_page_test extends phpbb_session_test_case
'root_script_path' => '/phpBB/', 'root_script_path' => '/phpBB/',
//'page' => 'adm/index.php', //'page' => 'adm/index.php',
'forum' => 0, 'forum' => 0,
) ),
) ),
); );
} }

View file

@ -27,7 +27,8 @@ class phpbb_session_testable_facade
protected $db; protected $db;
protected $session_factory; protected $session_factory;
function __construct($db, $session_factory) { function __construct($db, $session_factory)
{
$this->db = $db; $this->db = $db;
$this->session_factory = $session_factory; $this->session_factory = $session_factory;
} }

View file

@ -52,7 +52,7 @@ class phpbb_session_validate_referrer_test extends phpbb_session_test_case
) )
{ {
// Referrer needs http:// because it's going to get stripped in function. // Referrer needs http:// because it's going to get stripped in function.
$referrer = $referrer ? 'http://'.$referrer : ''; $referrer = $referrer ? 'http://' . $referrer : '';
$this->assertEquals( $this->assertEquals(
$pass_or_fail, $pass_or_fail,
$this->session_facade->validate_referer( $this->session_facade->validate_referer(
@ -63,6 +63,7 @@ class phpbb_session_validate_referrer_test extends phpbb_session_test_case
$server_port, $server_port,
$server_name, $server_name,
$root_script_path $root_script_path
), "referrer should" . ($pass_or_fail? '' : "n't") . " be validated"); ),
"referrer should" . ($pass_or_fail ? '' : "n't") . " be validated");
} }
} }