summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/libraries/Upload_test.php
diff options
context:
space:
mode:
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
+}