diff options
author | DiederikLascaris <info@runesa.nl> | 2017-01-22 21:45:15 +0100 |
---|---|---|
committer | DiederikLascaris <info@runesa.nl> | 2017-01-22 21:45:15 +0100 |
commit | 312efeba32d532878c536fd28e75f39d61a9dade (patch) | |
tree | 71ae4aaca33a9d34a789d6d375acd2594160123a /tests/codeigniter/libraries/Upload_test.php | |
parent | 947f1a06093a52a32b703ee795e52c22cd66363a (diff) | |
parent | 44c7af639ac1726780b64fb5a6cb6fca2df8b651 (diff) |
Merge branch 'develop' of git://github.com/bcit-ci/CodeIgniter into develop
Diffstat (limited to 'tests/codeigniter/libraries/Upload_test.php')
-rw-r--r-- | tests/codeigniter/libraries/Upload_test.php | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/tests/codeigniter/libraries/Upload_test.php b/tests/codeigniter/libraries/Upload_test.php index 4fbc11ef0..74a7d2c22 100644 --- a/tests/codeigniter/libraries/Upload_test.php +++ b/tests/codeigniter/libraries/Upload_test.php @@ -6,8 +6,8 @@ class Upload_test extends CI_TestCase { { $ci = $this->ci_instance(); $ci->upload = new CI_Upload(); - $ci->security = new Mock_Core_Security(); - $ci->lang = $this->getMock('CI_Lang', array('load', 'line')); + $ci->security = new Mock_Core_Security('UTF-8'); + $ci->lang = $this->getMockBuilder('CI_Lang')->setMethods(array('load', 'line'))->getMock(); $ci->lang->expects($this->any())->method('line')->will($this->returnValue(FALSE)); $this->upload = $ci->upload; } @@ -25,14 +25,10 @@ class Upload_test extends CI_TestCase { ) ); - // ReflectionProperty::setAccessible() is not available in PHP 5.2.x - if (is_php('5.3')) - { - $reflection = new ReflectionClass($upload); - $reflection = $reflection->getProperty('_file_name_override'); - $reflection->setAccessible(TRUE); - $this->assertEquals('foo', $reflection->getValue($upload)); - } + $reflection = new ReflectionClass($upload); + $reflection = $reflection->getProperty('_file_name_override'); + $reflection->setAccessible(TRUE); + $this->assertEquals('foo', $reflection->getValue($upload)); $this->assertTrue($upload->file_ext_tolower); @@ -300,4 +296,4 @@ class Upload_test extends CI_TestCase { $this->assertEquals('<p>Error test</p>', $this->upload->display_errors()); } -}
\ No newline at end of file +} |