aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auth/provider_apache_test.php8
-rw-r--r--tests/avatar/manager_test.php2
-rw-r--r--tests/mock/cache.php2
-rw-r--r--tests/mock/request.php32
-rw-r--r--tests/request/deactivated_super_global_test.php2
-rw-r--r--tests/security/extract_current_page_test.php4
6 files changed, 25 insertions, 25 deletions
diff --git a/tests/auth/provider_apache_test.php b/tests/auth/provider_apache_test.php
index 0ca6ef763e..9aa5f676d1 100644
--- a/tests/auth/provider_apache_test.php
+++ b/tests/auth/provider_apache_test.php
@@ -43,7 +43,7 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case
$this->request->expects($this->once())
->method('is_set')
->with('PHP_AUTH_USER',
- phpbb_request_interface::SERVER)
+ phpbb_request_request_interface::SERVER)
->will($this->returnValue(true));
$this->request->expects($this->once())
->method('server')
@@ -61,7 +61,7 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case
$this->request->expects($this->once())
->method('is_set')
->with('PHP_AUTH_USER',
- phpbb_request_interface::SERVER)
+ phpbb_request_request_interface::SERVER)
->will($this->returnValue(true));
$this->request->expects($this->at(1))
->method('server')
@@ -93,7 +93,7 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case
$this->request->expects($this->once())
->method('is_set')
->with('PHP_AUTH_USER',
- phpbb_request_interface::SERVER)
+ phpbb_request_request_interface::SERVER)
->will($this->returnValue(true));
$this->request->expects($this->at(1))
->method('server')
@@ -194,7 +194,7 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case
$this->request->expects($this->once())
->method('is_set')
->with('PHP_AUTH_USER',
- phpbb_request_interface::SERVER)
+ phpbb_request_request_interface::SERVER)
->will($this->returnValue(true));
$this->request->expects($this->once())
->method('server')
diff --git a/tests/avatar/manager_test.php b/tests/avatar/manager_test.php
index 4ebe79c9cd..71a58ffea9 100644
--- a/tests/avatar/manager_test.php
+++ b/tests/avatar/manager_test.php
@@ -24,7 +24,7 @@ class phpbb_avatar_manager_test extends PHPUnit_Framework_TestCase
// Prepare dependencies for avatar manager and driver
$config = new phpbb_config(array());
$request = $this->getMock('phpbb_request');
- $cache = $this->getMock('phpbb_cache_driver_interface');
+ $cache = $this->getMock('phpbb_cache_driver_driver_interface');
// $this->avatar_foobar will be needed later on
$this->avatar_foobar = $this->getMock('phpbb_avatar_driver_foobar', array('get_name'), array($config, $phpbb_root_path, $phpEx, $cache));
diff --git a/tests/mock/cache.php b/tests/mock/cache.php
index 440592665a..3e45a1730b 100644
--- a/tests/mock/cache.php
+++ b/tests/mock/cache.php
@@ -7,7 +7,7 @@
*
*/
-class phpbb_mock_cache implements phpbb_cache_driver_interface
+class phpbb_mock_cache implements phpbb_cache_driver_driver_interface
{
protected $data;
diff --git a/tests/mock/request.php b/tests/mock/request.php
index 2a272fc03b..04803594de 100644
--- a/tests/mock/request.php
+++ b/tests/mock/request.php
@@ -7,33 +7,33 @@
*
*/
-class phpbb_mock_request implements phpbb_request_interface
+class phpbb_mock_request implements phpbb_request_request_interface
{
protected $data;
public function __construct($get = array(), $post = array(), $cookie = array(), $server = array(), $request = false, $files = array())
{
- $this->data[phpbb_request_interface::GET] = $get;
- $this->data[phpbb_request_interface::POST] = $post;
- $this->data[phpbb_request_interface::COOKIE] = $cookie;
- $this->data[phpbb_request_interface::REQUEST] = ($request === false) ? $post + $get : $request;
- $this->data[phpbb_request_interface::SERVER] = $server;
- $this->data[phpbb_request_interface::FILES] = $files;
+ $this->data[phpbb_request_request_interface::GET] = $get;
+ $this->data[phpbb_request_request_interface::POST] = $post;
+ $this->data[phpbb_request_request_interface::COOKIE] = $cookie;
+ $this->data[phpbb_request_request_interface::REQUEST] = ($request === false) ? $post + $get : $request;
+ $this->data[phpbb_request_request_interface::SERVER] = $server;
+ $this->data[phpbb_request_request_interface::FILES] = $files;
}
- public function overwrite($var_name, $value, $super_global = phpbb_request_interface::REQUEST)
+ public function overwrite($var_name, $value, $super_global = phpbb_request_request_interface::REQUEST)
{
$this->data[$super_global][$var_name] = $value;
}
- public function variable($var_name, $default, $multibyte = false, $super_global = phpbb_request_interface::REQUEST)
+ public function variable($var_name, $default, $multibyte = false, $super_global = phpbb_request_request_interface::REQUEST)
{
return isset($this->data[$super_global][$var_name]) ? $this->data[$super_global][$var_name] : $default;
}
public function server($var_name, $default = '')
{
- $super_global = phpbb_request_interface::SERVER;
+ $super_global = phpbb_request_request_interface::SERVER;
return isset($this->data[$super_global][$var_name]) ? $this->data[$super_global][$var_name] : $default;
}
@@ -45,16 +45,16 @@ class phpbb_mock_request implements phpbb_request_interface
public function file($form_name)
{
- $super_global = phpbb_request_interface::FILES;
+ $super_global = phpbb_request_request_interface::FILES;
return isset($this->data[$super_global][$form_name]) ? $this->data[$super_global][$form_name] : array();
}
public function is_set_post($name)
{
- return $this->is_set($name, phpbb_request_interface::POST);
+ return $this->is_set($name, phpbb_request_request_interface::POST);
}
- public function is_set($var, $super_global = phpbb_request_interface::REQUEST)
+ public function is_set($var, $super_global = phpbb_request_request_interface::REQUEST)
{
return isset($this->data[$super_global][$var]);
}
@@ -69,7 +69,7 @@ class phpbb_mock_request implements phpbb_request_interface
return false;
}
- public function variable_names($super_global = phpbb_request_interface::REQUEST)
+ public function variable_names($super_global = phpbb_request_request_interface::REQUEST)
{
return array_keys($this->data[$super_global]);
}
@@ -79,10 +79,10 @@ class phpbb_mock_request implements phpbb_request_interface
public function set_header($header_name, $value)
{
$var_name = 'HTTP_' . str_replace('-', '_', strtoupper($header_name));
- $this->data[phpbb_request_interface::SERVER][$var_name] = $value;
+ $this->data[phpbb_request_request_interface::SERVER][$var_name] = $value;
}
- public function merge($super_global = phpbb_request_interface::REQUEST, $values)
+ public function merge($super_global = phpbb_request_request_interface::REQUEST, $values)
{
$this->data[$super_global] = array_merge($this->data[$super_global], $values);
}
diff --git a/tests/request/deactivated_super_global_test.php b/tests/request/deactivated_super_global_test.php
index 2e19928a5a..28ba285468 100644
--- a/tests/request/deactivated_super_global_test.php
+++ b/tests/request/deactivated_super_global_test.php
@@ -16,7 +16,7 @@ class phpbb_deactivated_super_global_test extends phpbb_test_case
public function test_write_triggers_error()
{
$this->setExpectedTriggerError(E_USER_ERROR);
- $obj = new phpbb_request_deactivated_super_global($this->getMock('phpbb_request_interface'), 'obj', phpbb_request_interface::POST);
+ $obj = new phpbb_request_deactivated_super_global($this->getMock('phpbb_request_request_interface'), 'obj', phpbb_request_request_interface::POST);
$obj->offsetSet(0, 0);
}
}
diff --git a/tests/security/extract_current_page_test.php b/tests/security/extract_current_page_test.php
index d77cbbcaf3..1bf471d04f 100644
--- a/tests/security/extract_current_page_test.php
+++ b/tests/security/extract_current_page_test.php
@@ -28,7 +28,7 @@ class phpbb_security_extract_current_page_test extends phpbb_security_test_base
{
global $request;
- $request->merge(phpbb_request_interface::SERVER, array(
+ $request->merge(phpbb_request_request_interface::SERVER, array(
'PHP_SELF' => $url,
'QUERY_STRING' => $query_string,
));
@@ -46,7 +46,7 @@ class phpbb_security_extract_current_page_test extends phpbb_security_test_base
{
global $request;
- $request->merge(phpbb_request_interface::SERVER, array(
+ $request->merge(phpbb_request_request_interface::SERVER, array(
'PHP_SELF' => $url,
'QUERY_STRING' => $query_string,
));