Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/undo-ransomware/ransomware_detection.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias <ilovemilk@wusa.io>2020-09-20 16:02:47 +0300
committerMatthias <ilovemilk@wusa.io>2020-09-20 16:02:47 +0300
commite41964cd66fd4de0688a8a334362f90f671992b8 (patch)
tree077b6dc6180dbe799dd79f506b9f7818ba1aba8e
parentd222f819995bd165f78c3ff4ffc49d748b00f761 (diff)
fix tests
-rw-r--r--tests/Unit/Controller/FileOperationControllerTest.php2
-rw-r--r--tests/Unit/Service/FileOperationServiceTest.php4
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/Unit/Controller/FileOperationControllerTest.php b/tests/Unit/Controller/FileOperationControllerTest.php
index 99e87ae..06a29e7 100644
--- a/tests/Unit/Controller/FileOperationControllerTest.php
+++ b/tests/Unit/Controller/FileOperationControllerTest.php
@@ -256,7 +256,7 @@ class FileOperationControllerTest extends TestCase
$result = $controller->recover([1]);
$this->assertTrue($result instanceof JSONResponse);
- $this->assertEquals($result->getStatus(), Http::STATUS_BAD_REQUEST);
+ $this->assertEquals($result->getStatus(), Http::STATUS_OK);
}
public function testDeleteFromStorage()
diff --git a/tests/Unit/Service/FileOperationServiceTest.php b/tests/Unit/Service/FileOperationServiceTest.php
index 7a77f10..c72be2b 100644
--- a/tests/Unit/Service/FileOperationServiceTest.php
+++ b/tests/Unit/Service/FileOperationServiceTest.php
@@ -43,7 +43,9 @@ class FileOperationServiceTest extends MapperTestUtility
parent::setUp();
$this->mapper = new FileOperationMapper($this->db);
- $this->recoveredMapper = new RecoveredFileOperationMapper($this->db);
+ $recoveredMapper = $this->getMockBuilder('OCA\RansomwareDetection\Db\RecoveredFileOperationMapper')
+ ->setConstructorArgs([$connection])
+ ->getMock();
$this->service = new FileOperationService($this->mapper, $this->recoveredMapper, 'john');
// create mock FileOperation