aboutsummaryrefslogtreecommitdiffstats
path: root/tests/upload
diff options
context:
space:
mode:
Diffstat (limited to 'tests/upload')
-rw-r--r--tests/upload/filespec_test.php2
-rw-r--r--tests/upload/fileupload_test.php12
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/upload/filespec_test.php b/tests/upload/filespec_test.php
index 18b6deed1f..b41b95d925 100644
--- a/tests/upload/filespec_test.php
+++ b/tests/upload/filespec_test.php
@@ -79,7 +79,7 @@ class phpbb_filespec_test extends phpbb_test_case
$this->phpbb_root_path = $phpbb_root_path;
}
- private function set_reflection_property(&$class, $property_name, $value)
+ private function set_reflection_property($class, $property_name, $value)
{
$property = new ReflectionProperty($class, $property_name);
$property->setAccessible(true);
diff --git a/tests/upload/fileupload_test.php b/tests/upload/fileupload_test.php
index fb72823f08..5b3357237d 100644
--- a/tests/upload/fileupload_test.php
+++ b/tests/upload/fileupload_test.php
@@ -173,7 +173,7 @@ class phpbb_fileupload_test extends phpbb_test_case
->set_max_filesize(1000);
$file = $this->gen_valid_filespec();
$upload->common_checks($file);
- $this->assertEquals(0, sizeof($file->error));
+ $this->assertEquals(0, count($file->error));
}
public function test_local_upload()
@@ -184,7 +184,7 @@ class phpbb_fileupload_test extends phpbb_test_case
copy($this->path . 'jpg', $this->path . 'jpg.jpg');
$file = $upload->handle_upload('files.types.local', $this->path . 'jpg.jpg');
- $this->assertEquals(0, sizeof($file->error));
+ $this->assertEquals(0, count($file->error));
$this->assertFalse($file->additional_checks());
$this->assertTrue($file->move_file('../tests/upload/fixture/copies', true));
$file->remove();
@@ -198,10 +198,10 @@ class phpbb_fileupload_test extends phpbb_test_case
copy($this->path . 'jpg', $this->path . 'jpg.jpg');
$file = $upload->handle_upload('files.types.local', $this->path . 'jpg.jpg');
- $this->assertEquals(0, sizeof($file->error));
+ $this->assertEquals(0, count($file->error));
$this->assertFalse($file->move_file('../tests/upload/fixture'));
$this->assertFalse($file->get('file_moved'));
- $this->assertEquals(1, sizeof($file->error));
+ $this->assertEquals(1, count($file->error));
}
public function test_move_existent_file_overwrite()
@@ -213,9 +213,9 @@ class phpbb_fileupload_test extends phpbb_test_case
copy($this->path . 'jpg', $this->path . 'jpg.jpg');
copy($this->path . 'jpg', $this->path . 'copies/jpg.jpg');
$file = $upload->handle_upload('files.types.local', $this->path . 'jpg.jpg');
- $this->assertEquals(0, sizeof($file->error));
+ $this->assertEquals(0, count($file->error));
$file->move_file('../tests/upload/fixture/copies', true);
- $this->assertEquals(0, sizeof($file->error));
+ $this->assertEquals(0, count($file->error));
unlink($this->path . 'copies/jpg.jpg');
}