diff options
author | Nils Adermann <naderman@naderman.de> | 2013-07-14 13:30:52 -0400 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2013-07-14 13:30:52 -0400 |
commit | da2752e4004b296ae5acdd08b7c0a758d8f61e9d (patch) | |
tree | d29e821186f365c55120d8cba89014f30c73da19 /tests/mock | |
parent | b81613e5e57fd208e832637b6886abf9ec806c4b (diff) | |
download | forums-da2752e4004b296ae5acdd08b7c0a758d8f61e9d.tar forums-da2752e4004b296ae5acdd08b7c0a758d8f61e9d.tar.gz forums-da2752e4004b296ae5acdd08b7c0a758d8f61e9d.tar.bz2 forums-da2752e4004b296ae5acdd08b7c0a758d8f61e9d.tar.xz forums-da2752e4004b296ae5acdd08b7c0a758d8f61e9d.zip |
[ticket/11700] Modify all code to use the new interface names
PHPBB3-11700
Diffstat (limited to 'tests/mock')
-rw-r--r-- | tests/mock/cache.php | 2 | ||||
-rw-r--r-- | tests/mock/request.php | 32 |
2 files changed, 17 insertions, 17 deletions
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); } |