summaryrefslogtreecommitdiffstats
path: root/tests/Unit/Utility
diff options
context:
space:
mode:
authorSean Molenaar <sean@seanmolenaar.eu>2020-08-29 23:39:35 +0200
committerBenjamin Brahmer <info@b-brahmer.de>2020-09-27 15:35:31 +0200
commitd00d1ab2a28f428223e52b17052c072c64784016 (patch)
treec019f85fb7ac67147dd43ca64b4ac3cda99832f7 /tests/Unit/Utility
parent5687baca75d47dbdffd3de74e865ad2f71ef0cb7 (diff)
Create V2 mapper, Service and management commands
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Diffstat (limited to 'tests/Unit/Utility')
-rw-r--r--tests/Unit/Utility/UpdaterTest.php72
1 files changed, 0 insertions, 72 deletions
diff --git a/tests/Unit/Utility/UpdaterTest.php b/tests/Unit/Utility/UpdaterTest.php
deleted file mode 100644
index 3cd81de02..000000000
--- a/tests/Unit/Utility/UpdaterTest.php
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-/**
- * Nextcloud - News
- *
- * This file is licensed under the Affero General Public License version 3 or
- * later. See the COPYING file.
- *
- * @author Alessandro Cosentino <cosenal@gmail.com>
- * @author Bernhard Posselt <dev@bernhard-posselt.com>
- * @copyright 2012 Alessandro Cosentino
- * @copyright 2012-2014 Bernhard Posselt
- */
-
-namespace OCA\News\Tests\Unit\Utility;
-
-
-use OCA\News\Service\FeedService;
-use OCA\News\Service\FolderService;
-use OCA\News\Service\ItemService;
-use OCA\News\Utility\Updater;
-use PHPUnit\Framework\TestCase;
-
-class UpdaterTest extends TestCase
-{
-
- private $folderService;
- private $feedService;
- private $itemService;
- private $updater;
-
- protected function setUp(): void
- {
- $this->folderService = $this->getMockBuilder(FolderService::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->feedService = $this->getMockBuilder(FeedService::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->itemService = $this->getMockBuilder(ItemService::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->updater = new Updater(
- $this->folderService,
- $this->feedService,
- $this->itemService
- );
- }
-
- public function testBeforeUpdate()
- {
- $this->folderService->expects($this->once())
- ->method('purgeDeleted');
- $this->feedService->expects($this->once())
- ->method('purgeDeleted');
- $this->updater->beforeUpdate();
- }
-
-
- public function testAfterUpdate()
- {
- $this->itemService->expects($this->once())
- ->method('autoPurgeOld');
- $this->updater->afterUpdate();
- }
-
- public function testUpdate()
- {
- $this->feedService->expects($this->once())
- ->method('updateAll');
- $this->updater->update();
- }
-} \ No newline at end of file