diff options
author | Matthias <ilovemilk@wusa.io> | 2020-09-20 16:49:58 +0300 |
---|---|---|
committer | Matthias <ilovemilk@wusa.io> | 2020-09-20 16:49:58 +0300 |
commit | 9caad40f07c486150d38416daec442fb378d8446 (patch) | |
tree | 9e511cf711d3197d3dc9ed2dab15c1454b6fe674 | |
parent | 5013c2561b08ba5ab47307f299bf002a3d9c44ac (diff) |
fix tests
-rw-r--r-- | tests/Unit/Service/FileOperationServiceTest.php | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/tests/Unit/Service/FileOperationServiceTest.php b/tests/Unit/Service/FileOperationServiceTest.php index 7b02403..34e7a70 100644 --- a/tests/Unit/Service/FileOperationServiceTest.php +++ b/tests/Unit/Service/FileOperationServiceTest.php @@ -219,14 +219,12 @@ class FileOperationServiceTest extends MapperTestUtility $fileOperation->setId(3); $sql = 'SELECT * FROM `*PREFIX*ransomware_detection` WHERE `id` = ? AND `user_id` = ?'; - $arguments = [$fileOperation->getId(), $userId]; $rows = [['id' => $fileOperation->getId()]]; - $this->setMapperResult($sql, $arguments, $rows); + $this->setMapperResult($sql, [$fileOperation->getId(), $userId], $rows); - $sql = 'DELETE FROM `*PREFIX*ransomware_detection` WHERE `id` = ? AND `user_id` = ?'; - $arguments = [$fileOperation->getId(), $userId]; + $sql2 = 'DELETE FROM `*PREFIX*ransomware_detection` WHERE `id` = ? AND `user_id` = ?'; - $this->setMapperResult($sql, $arguments, [], null, null, true); + $this->setMapperResult($sql2, [$fileOperation->getId(), $userId], [], null, null, true); $this->service->deleteById($fileOperation->getId()); } @@ -240,14 +238,12 @@ class FileOperationServiceTest extends MapperTestUtility $fileOperation->setSequence(1); $sql = 'SELECT * FROM `*PREFIX*ransomware_detection` WHERE `sequence` = ? AND `user_id` = ?'; - $arguments = [$fileOperation->getSequence(), $userId]; $rows = [['id' => $fileOperation->getId()]]; - $this->setMapperResult($sql, $arguments, $rows); + $this->setMapperResult($sql, [$fileOperation->getSequence(), $userId], $rows); - $sql = 'DELETE FROM `*PREFIX*ransomware_detection` WHERE `sequence` = ? AND `user_id` = ?'; - $arguments = [$fileOperation->getSequence(), $userId]; + $sql2 = 'DELETE FROM `*PREFIX*ransomware_detection` WHERE `sequence` = ? AND `user_id` = ?'; - $this->setMapperResult($sql, $arguments, [], null, null, true); + $this->setMapperResult($sql2, [$fileOperation->getSequence(), $userId], [], null, null, true); $this->service->deleteSequenceById($fileOperation->getSequence()); } |