diff options
author | dchill42 <dchill42@gmail.com> | 2012-07-23 16:53:47 +0200 |
---|---|---|
committer | dchill42 <dchill42@gmail.com> | 2012-07-23 16:53:47 +0200 |
commit | c5079de78e5141330c07e990811ef15e998e95aa (patch) | |
tree | 0f39d8c4fc7614246fc185810bfeaa7fad88a33a /tests/mocks/libraries | |
parent | 00fcb545109d4e61bc14e403ec828749c34a54b3 (diff) | |
parent | ede49ba66b127535f3430e20aac72ceed2c4611a (diff) |
Merge branch develop of github.com:/EllisLab/CodeIgniter into session
Diffstat (limited to 'tests/mocks/libraries')
-rw-r--r-- | tests/mocks/libraries/encrypt.php | 16 | ||||
-rw-r--r-- | tests/mocks/libraries/parser.php | 3 | ||||
-rw-r--r-- | tests/mocks/libraries/table.php | 16 | ||||
-rw-r--r-- | tests/mocks/libraries/typography.php | 3 | ||||
-rw-r--r-- | tests/mocks/libraries/useragent.php | 3 |
5 files changed, 41 insertions, 0 deletions
diff --git a/tests/mocks/libraries/encrypt.php b/tests/mocks/libraries/encrypt.php new file mode 100644 index 000000000..f1859398f --- /dev/null +++ b/tests/mocks/libraries/encrypt.php @@ -0,0 +1,16 @@ +<?php + +class Mock_Libraries_Encrypt extends CI_Encrypt { + + // Overide inaccesible protected method + public function __call($method, $params) + { + if (is_callable(array($this, '_'.$method))) + { + return call_user_func_array(array($this, '_'.$method), $params); + } + + throw new BadMethodCallException('Method '.$method.' was not found'); + } + +}
\ No newline at end of file diff --git a/tests/mocks/libraries/parser.php b/tests/mocks/libraries/parser.php new file mode 100644 index 000000000..81dcfb37e --- /dev/null +++ b/tests/mocks/libraries/parser.php @@ -0,0 +1,3 @@ +<?php + +class Mock_Libraries_Parser extends CI_Parser {}
\ No newline at end of file diff --git a/tests/mocks/libraries/table.php b/tests/mocks/libraries/table.php new file mode 100644 index 000000000..87c278bce --- /dev/null +++ b/tests/mocks/libraries/table.php @@ -0,0 +1,16 @@ +<?php + +class Mock_Libraries_Table extends CI_Table { + + // Overide inaccesible protected method + public function __call($method, $params) + { + if (is_callable(array($this, '_'.$method))) + { + return call_user_func_array(array($this, '_'.$method), $params); + } + + throw new BadMethodCallException('Method '.$method.' was not found'); + } + +}
\ No newline at end of file diff --git a/tests/mocks/libraries/typography.php b/tests/mocks/libraries/typography.php new file mode 100644 index 000000000..0f76c5745 --- /dev/null +++ b/tests/mocks/libraries/typography.php @@ -0,0 +1,3 @@ +<?php + +class Mock_Libraries_Typography extends CI_Typography {}
\ No newline at end of file diff --git a/tests/mocks/libraries/useragent.php b/tests/mocks/libraries/useragent.php new file mode 100644 index 000000000..c957cde5b --- /dev/null +++ b/tests/mocks/libraries/useragent.php @@ -0,0 +1,3 @@ +<?php + +class Mock_Libraries_UserAgent extends CI_User_agent {}
\ No newline at end of file |