summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-10-24 13:55:35 +0200
committerAndrey Andreev <narf@bofh.bg>2012-10-24 13:55:35 +0200
commit5fd3ae8d33a4f5d3159b86683b9a670e973a63f5 (patch)
treee9d9b67931545e1059b2e27d532ac81ec5f33133 /tests
parent3639d4798cd1ac26b715d8d74ff7855474fb01d7 (diff)
[ci skip] style and phpdoc-related changes (rel #1295)
Diffstat (limited to 'tests')
-rw-r--r--tests/mocks/core/lang.php4
-rw-r--r--tests/mocks/libraries/session.php16
2 files changed, 10 insertions, 10 deletions
diff --git a/tests/mocks/core/lang.php b/tests/mocks/core/lang.php
index 1b99aedb3..27ea3faba 100644
--- a/tests/mocks/core/lang.php
+++ b/tests/mocks/core/lang.php
@@ -2,12 +2,12 @@
class Mock_Core_Lang extends CI_Lang {
- function line($line = '')
+ public function line($line = '')
{
return FALSE;
}
- function load($langfile, $idiom = '', $return = false, $add_suffix = true, $alt_path = '')
+ public function load($langfile, $idiom = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '')
{
return;
}
diff --git a/tests/mocks/libraries/session.php b/tests/mocks/libraries/session.php
index 9d6feee42..c6e194f58 100644
--- a/tests/mocks/libraries/session.php
+++ b/tests/mocks/libraries/session.php
@@ -4,6 +4,7 @@
* Mock library to add testing features to Session driver library
*/
class Mock_Libraries_Session extends CI_Session {
+
/**
* Simulate new page load
*/
@@ -19,18 +20,18 @@ class Mock_Libraries_Session extends CI_Session {
* Mock cookie driver to overload cookie setting
*/
class Mock_Libraries_Session_cookie extends CI_Session_cookie {
+
/**
* Overload _setcookie to manage $_COOKIE values, since actual cookies can't be set in unit testing
*/
- protected function _setcookie($name, $value = '', $expire = 0, $path = '', $domain = '', $secure = false,
- $httponly = false)
+ protected function _setcookie($name, $value = '', $expire = 0, $path = '', $domain = '', $secure = FALSE, $httponly = FALSE)
{
- if (empty($value) || $expire <= time()) {
- // Clear cookie
+ if (empty($value) OR $expire <= time())
+ {
unset($_COOKIE[$name]);
}
- else {
- // Set cookie
+ else
+ {
$_COOKIE[$name] = $value;
}
}
@@ -39,5 +40,4 @@ class Mock_Libraries_Session_cookie extends CI_Session_cookie {
/**
* Mock native driver (just for consistency in loading)
*/
-class Mock_Libraries_Session_native extends CI_Session_native { }
-
+class Mock_Libraries_Session_native extends CI_Session_native { } \ No newline at end of file