aboutsummaryrefslogtreecommitdiffstats
path: root/tests/attachment/delete_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/attachment/delete_test.php')
-rw-r--r--tests/attachment/delete_test.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/attachment/delete_test.php b/tests/attachment/delete_test.php
index f1835dd37a..59669c87e9 100644
--- a/tests/attachment/delete_test.php
+++ b/tests/attachment/delete_test.php
@@ -24,6 +24,9 @@ class phpbb_attachment_delete_test extends \phpbb_database_test_case
/** @var \phpbb\filesystem\filesystem */
protected $filesystem;
+ /** @var \phpbb\event\dispatcher_interface */
+ protected $dispatcher;
+
/** @var \phpbb\attachment\resync */
protected $resync;
@@ -37,9 +40,9 @@ class phpbb_attachment_delete_test extends \phpbb_database_test_case
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/resync.xml');
}
- public function setUp()
+ public function setUp(): void
{
- global $db, $phpbb_root_path;
+ global $phpbb_root_path;
parent::setUp();
@@ -47,7 +50,7 @@ class phpbb_attachment_delete_test extends \phpbb_database_test_case
$this->db = $this->new_dbal();
$db = $this->db;
$this->resync = new \phpbb\attachment\resync($this->db);
- $this->filesystem = $this->getMock('\phpbb\filesystem\filesystem', array('remove', 'exists'));
+ $this->filesystem = $this->createMock('\phpbb\filesystem\filesystem', array('remove', 'exists'));
$this->filesystem->expects($this->any())
->method('remove')
->willReturn(false);
@@ -103,7 +106,7 @@ class phpbb_attachment_delete_test extends \phpbb_database_test_case
*/
public function test_attachment_delete_success($remove_success, $exists_success, $expected, $throw_exception = false)
{
- $this->filesystem = $this->getMock('\phpbb\filesystem\filesystem', array('remove', 'exists'));
+ $this->filesystem = $this->createMock('\phpbb\filesystem\filesystem', array('remove', 'exists'));
if ($throw_exception)
{
$this->filesystem->expects($this->any())