From dcd6f5153b7e7e6d798d5a77af65b7460f152e5c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 14 Dec 2016 18:14:35 +0200 Subject: Isolate CI_Security instantiation from CI_Input; improve tests --- tests/mocks/ci_testcase.php | 4 ++-- tests/mocks/core/input.php | 8 +++----- tests/mocks/core/utf8.php | 19 ------------------- 3 files changed, 5 insertions(+), 26 deletions(-) delete mode 100644 tests/mocks/core/utf8.php (limited to 'tests/mocks') diff --git a/tests/mocks/ci_testcase.php b/tests/mocks/ci_testcase.php index a2c37b92e..b320aab74 100644 --- a/tests/mocks/ci_testcase.php +++ b/tests/mocks/ci_testcase.php @@ -24,9 +24,9 @@ class CI_TestCase extends PHPUnit_Framework_TestCase { // -------------------------------------------------------------------- - public function __construct() + public function __construct($name = null, array $data = [], $dataName = '') { - parent::__construct(); + parent::__construct($name, $data, $dataName); $this->ci_instance = new stdClass(); } diff --git a/tests/mocks/core/input.php b/tests/mocks/core/input.php index 4d217a252..6f6a91365 100644 --- a/tests/mocks/core/input.php +++ b/tests/mocks/core/input.php @@ -9,12 +9,10 @@ class Mock_Core_Input extends CI_Input { * * @covers CI_Input::__construct() */ - public function __construct($security, $utf8) + public function __construct($security) { - $this->_enable_csrf = (config_item('csrf_protection') === TRUE); - - // Assign Security and Utf8 classes - $this->security = $security; + $this->_enable_csrf = (config_item('csrf_protection') === TRUE); + $this->security = $security; } public function fetch_from_array($array, $index = '', $xss_clean = FALSE) diff --git a/tests/mocks/core/utf8.php b/tests/mocks/core/utf8.php deleted file mode 100644 index 3a6282e1d..000000000 --- a/tests/mocks/core/utf8.php +++ /dev/null @@ -1,19 +0,0 @@ -