From 681cf397263824ff95e8e15aa599884d81d74b21 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 24 Mar 2020 21:15:52 +0100 Subject: bump nextcloud version to 18 --- appinfo/info.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index db0d72a..0070b64 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -20,7 +20,7 @@ https://github.com/undo-ransomware/ransomware_detection/raw/master/screenshots/monitoring-0.3.0.png https://github.com/undo-ransomware/ransomware_detection/raw/master/screenshots/scan-files-0.3.0.png - + -- cgit v1.2.3 From 2ce1d5f36873626a4883a8e0e9072c5cca78f1ba Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 24 Mar 2020 21:37:20 +0100 Subject: bump version to 0.7.0 --- .travis.yml | 2 +- CHANGELOG.md | 6 ++++++ appinfo/info.xml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e60d12f..57982b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: php env: global: - - CORE_BRANCH=stable17 + - CORE_BRANCH=stable18 - APP_NAME=ransomware_detection services: diff --git a/CHANGELOG.md b/CHANGELOG.md index 85c9b5d..0517815 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. +## 0.7.0 + +### Added + +- Nextcloud version 17 support. + ## 0.6.0 ### Added diff --git a/appinfo/info.xml b/appinfo/info.xml index 0070b64..db55c2a 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -5,7 +5,7 @@ Ransomware recovery - 0.6.0 + 0.7.0 agpl Matthias Held RansomwareDetection -- cgit v1.2.3 From c0d0c2aa5f9c2373baf307caae4af7e52db9b08e Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 27 Mar 2020 09:18:11 +0100 Subject: bump php version to 7.2 --- .travis.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 57982b6..afcc3d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,42 +30,42 @@ jobs: - env: "CHECKSTYLE=2" include: - stage: test - php: 7.1 + php: 7.2 env: - DB=mysql script: - cd apps/$APP_NAME/ - phpunit --configuration phpunit.xml - stage: test - php: 7.1 + php: 7.2 env: - DB=pgsql script: - cd apps/$APP_NAME/ - phpunit --configuration phpunit.xml - stage: test - php: 7.1 + php: 7.2 env: - DB=mysql script: - cd apps/$APP_NAME/ - phpunit --configuration phpunit.xml - stage: test - php: 7.1 + php: 7.2 env: - DB=mysql - CHECKSTYLE=1 script: - ./occ app:check-code $APP_NAME -c private -c strong-comparison - stage: test - php: 7.1 + php: 7.2 env: - DB=mysql - CHECKSTYLE=2 script: - ./occ app:check-code $APP_NAME -c deprecation - stage: report - php: 7.1 + php: 7.2 env: - DB=sqlite script: @@ -73,7 +73,7 @@ jobs: - wget https://codecov.io/bash -O codecov.sh - bash codecov.sh - stage: build - php: 7.1 + php: 7.2 env: - DB=sqlite script: -- cgit v1.2.3 From 7bb713e57667b8704d8f5dde4cfcd7b125b7cfb9 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 28 Mar 2020 10:46:45 +0100 Subject: change setUp method signature to match parent --- tests/Unit/Analyzer/EntropyAnalyzerTest.php | 2 +- tests/Unit/Analyzer/EntropyResultTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Unit/Analyzer/EntropyAnalyzerTest.php b/tests/Unit/Analyzer/EntropyAnalyzerTest.php index b78c164..87e9f3c 100644 --- a/tests/Unit/Analyzer/EntropyAnalyzerTest.php +++ b/tests/Unit/Analyzer/EntropyAnalyzerTest.php @@ -44,7 +44,7 @@ class EntropyAnalyzerTest extends TestCase /** @var string */ protected $userId = 'john'; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Analyzer/EntropyResultTest.php b/tests/Unit/Analyzer/EntropyResultTest.php index 658647a..9a15ae9 100644 --- a/tests/Unit/Analyzer/EntropyResultTest.php +++ b/tests/Unit/Analyzer/EntropyResultTest.php @@ -29,7 +29,7 @@ class EntropyResultTest extends TestCase /** @var EntropyResult */ protected $entropyResult; - public function setUp() + public function setUp(): void { parent::setUp(); -- cgit v1.2.3 From ad7a9d55665e9dac65726a4282451b83b0f8ac77 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 28 Mar 2020 10:52:45 +0100 Subject: change setUp method signature to match parent --- tests/Integration/AppTest.php | 2 +- tests/Unit/Analyzer/FileCorruptionAnalyzerTest.php | 2 +- tests/Unit/Analyzer/FileCorruptionResultTest.php | 2 +- tests/Unit/Analyzer/FileExtensionAnalyzerTest.php | 2 +- tests/Unit/Analyzer/FileExtensionResultTest.php | 2 +- tests/Unit/Analyzer/FileTypeFunnellingAnalyzerTest.php | 2 +- tests/Unit/Analyzer/SequenceAnalyzerTest.php | 2 +- tests/Unit/Analyzer/SequenceOperationsAnalyzerTest.php | 2 +- tests/Unit/Analyzer/SequenceResultTest.php | 2 +- tests/Unit/Analyzer/SequenceSizeAnalyzerTest.php | 2 +- tests/Unit/AppInfo/ApplicationTest.php | 2 +- tests/Unit/BackgroundJob/CleanUpJobTest.php | 2 +- tests/Unit/Connector/Sabre/RequestPluginTest.php | 2 +- tests/Unit/Controller/BasicControllerTest.php | 2 +- tests/Unit/Controller/MonitoringControllerTest.php | 2 +- tests/Unit/Controller/RecoverControllerTest.php | 2 +- tests/Unit/Controller/ScanControllerTest.php | 2 +- tests/Unit/Db/FileOperationMapperTest.php | 2 +- tests/Unit/Db/FileOperationTest.php | 2 +- tests/Unit/Db/MapperTestUtility.php | 2 +- tests/Unit/Entropy/EntropyTest.php | 2 +- tests/Unit/FileSignatureTest.php | 2 +- tests/Unit/MonitorTest.php | 2 +- tests/Unit/Notification/NotifierTest.php | 2 +- tests/Unit/Scanner/StorageStructureTest.php | 2 +- tests/Unit/Service/FileOperationServiceTest.php | 2 +- tests/Unit/Settings/AdminSectionTest.php | 3 ++- tests/Unit/Settings/AdminTest.php | 3 ++- tests/Unit/Settings/PersonalSectionTest.php | 3 ++- tests/Unit/Settings/PersonalTest.php | 3 ++- tests/Unit/StorageWrapperTest.php | 2 +- 31 files changed, 35 insertions(+), 31 deletions(-) diff --git a/tests/Integration/AppTest.php b/tests/Integration/AppTest.php index d2ca4bd..937a5da 100644 --- a/tests/Integration/AppTest.php +++ b/tests/Integration/AppTest.php @@ -43,7 +43,7 @@ abstract class AppTest extends PHPUnit_Framework_TestCase protected $userId = 'john'; - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Analyzer/FileCorruptionAnalyzerTest.php b/tests/Unit/Analyzer/FileCorruptionAnalyzerTest.php index e40fc71..5a14eeb 100644 --- a/tests/Unit/Analyzer/FileCorruptionAnalyzerTest.php +++ b/tests/Unit/Analyzer/FileCorruptionAnalyzerTest.php @@ -42,7 +42,7 @@ class FileCorruptionAnalyzerTest extends TestCase /** @var FileCorruptionAnalyzer */ protected $fileCorruptionAnalyzer; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Analyzer/FileCorruptionResultTest.php b/tests/Unit/Analyzer/FileCorruptionResultTest.php index 15947e6..92df811 100644 --- a/tests/Unit/Analyzer/FileCorruptionResultTest.php +++ b/tests/Unit/Analyzer/FileCorruptionResultTest.php @@ -29,7 +29,7 @@ class FileCorruptionResultTest extends TestCase /** @var FileResult */ protected $fileResult; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Analyzer/FileExtensionAnalyzerTest.php b/tests/Unit/Analyzer/FileExtensionAnalyzerTest.php index 459842c..cb14976 100644 --- a/tests/Unit/Analyzer/FileExtensionAnalyzerTest.php +++ b/tests/Unit/Analyzer/FileExtensionAnalyzerTest.php @@ -36,7 +36,7 @@ class FileExtensionAnalyzerTest extends TestCase /** @var FileExtensionAnalyzer */ protected $fileExtensionAnalyzer; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Analyzer/FileExtensionResultTest.php b/tests/Unit/Analyzer/FileExtensionResultTest.php index 7f6ad0e..ca33d7b 100644 --- a/tests/Unit/Analyzer/FileExtensionResultTest.php +++ b/tests/Unit/Analyzer/FileExtensionResultTest.php @@ -29,7 +29,7 @@ class FileExtensionResultTest extends TestCase /** @var FileExtensionResult */ protected $fileExtensioneResult; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Analyzer/FileTypeFunnellingAnalyzerTest.php b/tests/Unit/Analyzer/FileTypeFunnellingAnalyzerTest.php index 054d6a3..6d265a2 100644 --- a/tests/Unit/Analyzer/FileTypeFunnellingAnalyzerTest.php +++ b/tests/Unit/Analyzer/FileTypeFunnellingAnalyzerTest.php @@ -32,7 +32,7 @@ class FileTypeFunnellingAnalyzerTest extends TestCase /** @var FileTypeFunnellingAnalyzer */ protected $fileTypeFunnellingAnalyzer; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Analyzer/SequenceAnalyzerTest.php b/tests/Unit/Analyzer/SequenceAnalyzerTest.php index 4c9a774..1b31939 100644 --- a/tests/Unit/Analyzer/SequenceAnalyzerTest.php +++ b/tests/Unit/Analyzer/SequenceAnalyzerTest.php @@ -45,7 +45,7 @@ class SequenceAnalyzerTest extends TestCase /** @var SequenceSizeAnalyzer */ protected $sequenceSizeAnalyzer; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Analyzer/SequenceOperationsAnalyzerTest.php b/tests/Unit/Analyzer/SequenceOperationsAnalyzerTest.php index 5a7111b..f6b5383 100644 --- a/tests/Unit/Analyzer/SequenceOperationsAnalyzerTest.php +++ b/tests/Unit/Analyzer/SequenceOperationsAnalyzerTest.php @@ -31,7 +31,7 @@ class SequenceOperationsAnalyzerTest extends TestCase /** @var SequenceOperationsAnalyzer */ protected $sequenceOperationsAnalyzer; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Analyzer/SequenceResultTest.php b/tests/Unit/Analyzer/SequenceResultTest.php index adc21dc..3007b22 100644 --- a/tests/Unit/Analyzer/SequenceResultTest.php +++ b/tests/Unit/Analyzer/SequenceResultTest.php @@ -29,7 +29,7 @@ class SequenceResultTest extends TestCase /** @var SequenceResult */ protected $sequenceResult; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Analyzer/SequenceSizeAnalyzerTest.php b/tests/Unit/Analyzer/SequenceSizeAnalyzerTest.php index f419c82..64be25b 100644 --- a/tests/Unit/Analyzer/SequenceSizeAnalyzerTest.php +++ b/tests/Unit/Analyzer/SequenceSizeAnalyzerTest.php @@ -31,7 +31,7 @@ class SequenceSizeAnalyzerTest extends TestCase /** @var SequenceSizeAnalyzer */ protected $sequenceSizeAnalyzer; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/AppInfo/ApplicationTest.php b/tests/Unit/AppInfo/ApplicationTest.php index 81fcad2..04341cb 100644 --- a/tests/Unit/AppInfo/ApplicationTest.php +++ b/tests/Unit/AppInfo/ApplicationTest.php @@ -35,7 +35,7 @@ class ApplicationTest extends TestCase /** @var \OCP\AppFramework\IAppContainer */ protected $container; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/BackgroundJob/CleanUpJobTest.php b/tests/Unit/BackgroundJob/CleanUpJobTest.php index a2e6bc1..d5018c2 100644 --- a/tests/Unit/BackgroundJob/CleanUpJobTest.php +++ b/tests/Unit/BackgroundJob/CleanUpJobTest.php @@ -38,7 +38,7 @@ class CleanUpJobTest extends MapperTestUtility /** @var IConfige|\PHPUnit_Framework_MockObject_MockObject */ protected $config; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Connector/Sabre/RequestPluginTest.php b/tests/Unit/Connector/Sabre/RequestPluginTest.php index 9c2c282..d2b6eda 100644 --- a/tests/Unit/Connector/Sabre/RequestPluginTest.php +++ b/tests/Unit/Connector/Sabre/RequestPluginTest.php @@ -66,7 +66,7 @@ class RequestPluginTest extends TestCase /** @var SequenceAnalyzer|\PHPUnit_Framework_MockObject_MockObject */ protected $sequenceAnalyzer; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Controller/BasicControllerTest.php b/tests/Unit/Controller/BasicControllerTest.php index b49592e..8d5bc15 100644 --- a/tests/Unit/Controller/BasicControllerTest.php +++ b/tests/Unit/Controller/BasicControllerTest.php @@ -42,7 +42,7 @@ class BasicControllerTest extends TestCase /** @var string */ protected $userId = 'john'; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Controller/MonitoringControllerTest.php b/tests/Unit/Controller/MonitoringControllerTest.php index 3a07604..81c41c6 100644 --- a/tests/Unit/Controller/MonitoringControllerTest.php +++ b/tests/Unit/Controller/MonitoringControllerTest.php @@ -61,7 +61,7 @@ class MonitoringControllerTest extends TestCase /** @var string */ protected $userId = 'john'; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Controller/RecoverControllerTest.php b/tests/Unit/Controller/RecoverControllerTest.php index c08d5d9..9be4ef5 100644 --- a/tests/Unit/Controller/RecoverControllerTest.php +++ b/tests/Unit/Controller/RecoverControllerTest.php @@ -33,7 +33,7 @@ class RecoverControllerTest extends TestCase /** @var string */ private $userId = 'john'; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Controller/ScanControllerTest.php b/tests/Unit/Controller/ScanControllerTest.php index 80f2364..7133bbf 100644 --- a/tests/Unit/Controller/ScanControllerTest.php +++ b/tests/Unit/Controller/ScanControllerTest.php @@ -96,7 +96,7 @@ class ScanControllerTest extends TestCase /** @var string */ protected $userId = 'john'; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Db/FileOperationMapperTest.php b/tests/Unit/Db/FileOperationMapperTest.php index 2ac5519..6997c9e 100644 --- a/tests/Unit/Db/FileOperationMapperTest.php +++ b/tests/Unit/Db/FileOperationMapperTest.php @@ -32,7 +32,7 @@ class FileOperationMapperTest extends MapperTestUtility /** @var array */ protected $fileOperations; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Db/FileOperationTest.php b/tests/Unit/Db/FileOperationTest.php index 3befa4d..3098b92 100644 --- a/tests/Unit/Db/FileOperationTest.php +++ b/tests/Unit/Db/FileOperationTest.php @@ -33,7 +33,7 @@ class FileOperationTest extends TestCase /** @var FileOperation */ protected $entity; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Db/MapperTestUtility.php b/tests/Unit/Db/MapperTestUtility.php index fc4bff6..9470c38 100644 --- a/tests/Unit/Db/MapperTestUtility.php +++ b/tests/Unit/Db/MapperTestUtility.php @@ -41,7 +41,7 @@ abstract class MapperTestUtility extends TestCase * Run this function before the actual test to either set or initialize the * db. After this the db can be accessed by using $this->db. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Entropy/EntropyTest.php b/tests/Unit/Entropy/EntropyTest.php index f4f87ce..a85a070 100644 --- a/tests/Unit/Entropy/EntropyTest.php +++ b/tests/Unit/Entropy/EntropyTest.php @@ -32,7 +32,7 @@ class EntropyTest extends TestCase /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ protected $logger; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/FileSignatureTest.php b/tests/Unit/FileSignatureTest.php index e8e7f90..49465fc 100644 --- a/tests/Unit/FileSignatureTest.php +++ b/tests/Unit/FileSignatureTest.php @@ -27,7 +27,7 @@ use Test\TestCase; class FileSignaturesTest extends TestCase { - public function setUp() + public function setUp(): void { parent::setUp(); } diff --git a/tests/Unit/MonitorTest.php b/tests/Unit/MonitorTest.php index 4a7a488..296fa3a 100644 --- a/tests/Unit/MonitorTest.php +++ b/tests/Unit/MonitorTest.php @@ -78,7 +78,7 @@ class MonitorTest extends TestCase /** @var string */ protected $userId = 'john'; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Notification/NotifierTest.php b/tests/Unit/Notification/NotifierTest.php index 84786d1..88d063b 100644 --- a/tests/Unit/Notification/NotifierTest.php +++ b/tests/Unit/Notification/NotifierTest.php @@ -55,7 +55,7 @@ class NotifierTest extends TestCase /** @var Notifier|\PHPUnit_Framework_MockObject_MockObject */ protected $notifier; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Scanner/StorageStructureTest.php b/tests/Unit/Scanner/StorageStructureTest.php index 5d41f36..8139647 100644 --- a/tests/Unit/Scanner/StorageStructureTest.php +++ b/tests/Unit/Scanner/StorageStructureTest.php @@ -29,7 +29,7 @@ class StorageStructureTest extends TestCase /** @var StorageStructure */ protected $storageStructure; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Service/FileOperationServiceTest.php b/tests/Unit/Service/FileOperationServiceTest.php index 7df0aad..8ac2d3f 100644 --- a/tests/Unit/Service/FileOperationServiceTest.php +++ b/tests/Unit/Service/FileOperationServiceTest.php @@ -34,7 +34,7 @@ class FileOperationServiceTest extends MapperTestUtility /** @var FileOperationMapper */ protected $mapper; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Settings/AdminSectionTest.php b/tests/Unit/Settings/AdminSectionTest.php index 423b6dc..4f3a318 100644 --- a/tests/Unit/Settings/AdminSectionTest.php +++ b/tests/Unit/Settings/AdminSectionTest.php @@ -38,7 +38,8 @@ class AdminSectionTest extends TestCase { /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */ protected $l; - public function setUp() { + public function setUp(): void + { parent::setUp(); $this->urlGenerator = $this->getMockForAbstractClass( IURLGenerator::class, array(), '', FALSE, TRUE, TRUE, array( 'imagePath' ) ); diff --git a/tests/Unit/Settings/AdminTest.php b/tests/Unit/Settings/AdminTest.php index 440445a..63b8503 100644 --- a/tests/Unit/Settings/AdminTest.php +++ b/tests/Unit/Settings/AdminTest.php @@ -35,7 +35,8 @@ class AdminTest extends TestCase { /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ protected $config; - public function setUp() { + public function setUp(): void + { parent::setUp(); $this->config = $this->getMockForAbstractClass( IConfig::class, array(), '', FALSE, TRUE, TRUE, array( 'getAppValue' ) ); diff --git a/tests/Unit/Settings/PersonalSectionTest.php b/tests/Unit/Settings/PersonalSectionTest.php index 3992612..87d5a71 100644 --- a/tests/Unit/Settings/PersonalSectionTest.php +++ b/tests/Unit/Settings/PersonalSectionTest.php @@ -38,7 +38,8 @@ class PersonalSectionTest extends TestCase { /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */ protected $l; - public function setUp() { + public function setUp(): void + { parent::setUp(); $this->urlGenerator = $this->getMockForAbstractClass( IURLGenerator::class, array(), '', FALSE, TRUE, TRUE, array( 'imagePath' ) ); diff --git a/tests/Unit/Settings/PersonalTest.php b/tests/Unit/Settings/PersonalTest.php index e05d47b..d831b48 100644 --- a/tests/Unit/Settings/PersonalTest.php +++ b/tests/Unit/Settings/PersonalTest.php @@ -35,7 +35,8 @@ class PersonalTest extends TestCase { /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ protected $config; - public function setUp() { + public function setUp(): void + { parent::setUp(); $this->config = $this->getMockForAbstractClass( IConfig::class, array(), '', FALSE, TRUE, TRUE, array( 'getUserValue' ) ); diff --git a/tests/Unit/StorageWrapperTest.php b/tests/Unit/StorageWrapperTest.php index e45acf2..24d1833 100644 --- a/tests/Unit/StorageWrapperTest.php +++ b/tests/Unit/StorageWrapperTest.php @@ -32,7 +32,7 @@ class StorageWrapperTest extends TestCase /** @var \OCA\RansomwareDetection\Monitor|\PHPUnit_Framework_MockObject_MockObject */ protected $monitor; - protected function setUp() + protected function setUp(): void { parent::setUp(); -- cgit v1.2.3 From 8ca7c2e1be81c42110c5ef59761c66d04cf0f134 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 28 Mar 2020 10:58:04 +0100 Subject: change visibility to public --- tests/Unit/CacheWrapperTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Unit/CacheWrapperTest.php b/tests/Unit/CacheWrapperTest.php index f5dd2fe..b7b7a6f 100644 --- a/tests/Unit/CacheWrapperTest.php +++ b/tests/Unit/CacheWrapperTest.php @@ -35,7 +35,7 @@ class CacheWrapperTest extends TestCase /** @var \OCA\RansomwareDetection\Monitor\Operation|\PHPUnit_Framework_MockObject_MockObject */ protected $monitor; - protected function setUp() + public function setUp(): void { parent::setUp(); -- cgit v1.2.3 From aa3852eccf2bdbd78f4289fed0474b60ea5dd9ba Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 28 Mar 2020 11:07:52 +0100 Subject: fix signature --- tests/Unit/ClassifierTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Unit/ClassifierTest.php b/tests/Unit/ClassifierTest.php index aba5c87..d26628c 100644 --- a/tests/Unit/ClassifierTest.php +++ b/tests/Unit/ClassifierTest.php @@ -45,7 +45,7 @@ class ClassifierTest extends TestCase /** @var Classifier */ protected $classifier; - public function setUp() + public function setUp(): void { parent::setUp(); -- cgit v1.2.3 From 8a046c3cd70b0c0f376e7c5cd20b6e290f56592d Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 28 Mar 2020 11:12:44 +0100 Subject: add constructor arguments --- tests/Unit/AppInfo/ApplicationTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Unit/AppInfo/ApplicationTest.php b/tests/Unit/AppInfo/ApplicationTest.php index 04341cb..07c492e 100644 --- a/tests/Unit/AppInfo/ApplicationTest.php +++ b/tests/Unit/AppInfo/ApplicationTest.php @@ -68,7 +68,9 @@ class ApplicationTest extends TestCase public function testAddStorageWrapperCallback() { - $storage = $this->getMockBuilder('OCP\Files\Storage\IStorage')->getMock(); + $storage = $this->getMockBuilder('OCP\Files\Storage\IStorage') + ->setConstructorArgs([array()]); + ->getMock(); $result = $this->application->addStorageWrapperCallback('mountPoint', $storage); // Request from CLI, so $results is instanceof IStorage and not StorageWrapper -- cgit v1.2.3 From c12fb9fddee340bebfef93e4d32efbe874f45059 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 28 Mar 2020 11:23:00 +0100 Subject: fixt typo --- tests/Unit/AppInfo/ApplicationTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Unit/AppInfo/ApplicationTest.php b/tests/Unit/AppInfo/ApplicationTest.php index 07c492e..f838b7f 100644 --- a/tests/Unit/AppInfo/ApplicationTest.php +++ b/tests/Unit/AppInfo/ApplicationTest.php @@ -69,7 +69,7 @@ class ApplicationTest extends TestCase public function testAddStorageWrapperCallback() { $storage = $this->getMockBuilder('OCP\Files\Storage\IStorage') - ->setConstructorArgs([array()]); + ->setConstructorArgs([array()]) ->getMock(); $result = $this->application->addStorageWrapperCallback('mountPoint', $storage); -- cgit v1.2.3 From 2426ca27eb4d89d7b44daad776806ffb47539f3b Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 28 Mar 2020 11:35:45 +0100 Subject: add storage constructor arguments --- tests/Unit/CacheWrapperTest.php | 1 + tests/Unit/StorageWrapperTest.php | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/Unit/CacheWrapperTest.php b/tests/Unit/CacheWrapperTest.php index b7b7a6f..e23e3f1 100644 --- a/tests/Unit/CacheWrapperTest.php +++ b/tests/Unit/CacheWrapperTest.php @@ -42,6 +42,7 @@ class CacheWrapperTest extends TestCase $this->cache = $this->getMockBuilder('OCP\Files\Cache\ICache') ->getMock(); $this->storage = $this->getMockBuilder('OCP\Files\Storage\IStorage') + ->setConstructorArgs([array()]) ->getMock(); $this->monitor = $this->getMockBuilder('OCA\RansomwareDetection\Monitor') ->disableOriginalConstructor() diff --git a/tests/Unit/StorageWrapperTest.php b/tests/Unit/StorageWrapperTest.php index 24d1833..b3b2f23 100644 --- a/tests/Unit/StorageWrapperTest.php +++ b/tests/Unit/StorageWrapperTest.php @@ -37,6 +37,7 @@ class StorageWrapperTest extends TestCase parent::setUp(); $this->storage = $this->getMockBuilder('OCP\Files\Storage\IStorage') + ->setConstructorArgs([array()]) ->getMock(); $this->monitor = $this->getMockBuilder('OCA\RansomwareDetection\Monitor') -- cgit v1.2.3