summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/libraries/Upload_test.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-08-10 14:26:57 +0200
committerAndrey Andreev <narf@devilix.net>2016-08-10 14:26:57 +0200
commitc4bd43432df03e4f4835c7689c8ed722cd2c3020 (patch)
tree5603166833d78b0581bbe880adb53b6de085719d /tests/codeigniter/libraries/Upload_test.php
parent488ad40ba334ca506f07bede97724726eac2b27f (diff)
parent9180a1264dc536c34e5cc8a0e44bb399a8ba484f (diff)
Merge branch '3.1-stable' into develop
Diffstat (limited to 'tests/codeigniter/libraries/Upload_test.php')
-rw-r--r--tests/codeigniter/libraries/Upload_test.php16
1 files changed, 6 insertions, 10 deletions
diff --git a/tests/codeigniter/libraries/Upload_test.php b/tests/codeigniter/libraries/Upload_test.php
index 4fbc11ef0..8bac597b3 100644
--- a/tests/codeigniter/libraries/Upload_test.php
+++ b/tests/codeigniter/libraries/Upload_test.php
@@ -7,7 +7,7 @@ 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->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
+}