summaryrefslogtreecommitdiffstats
path: root/tests/Unit/Utility/UpdaterTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Unit/Utility/UpdaterTest.php')
-rw-r--r--tests/Unit/Utility/UpdaterTest.php38
1 files changed, 24 insertions, 14 deletions
diff --git a/tests/Unit/Utility/UpdaterTest.php b/tests/Unit/Utility/UpdaterTest.php
index 76ebe74f7..87bbe31b9 100644
--- a/tests/Unit/Utility/UpdaterTest.php
+++ b/tests/Unit/Utility/UpdaterTest.php
@@ -5,10 +5,10 @@
* 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 Alessandro Cosentino 2012
- * @copyright Bernhard Posselt 2012, 2014
+ * @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;
@@ -16,32 +16,40 @@ namespace OCA\News\Tests\Unit\Utility;
use OCA\News\Utility\Updater;
-class UpdaterTest extends \PHPUnit_Framework_TestCase {
+class UpdaterTest extends \PHPUnit_Framework_TestCase
+{
private $folderService;
private $feedService;
private $itemService;
private $updater;
- protected function setUp() {
+ protected function setUp()
+ {
$this->folderService = $this->getMockBuilder(
- '\OCA\News\Service\FolderService')
+ '\OCA\News\Service\FolderService'
+ )
->disableOriginalConstructor()
->getMock();
$this->feedService = $this->getMockBuilder(
- '\OCA\News\Service\FeedService')
+ '\OCA\News\Service\FeedService'
+ )
->disableOriginalConstructor()
->getMock();
$this->itemService = $this->getMockBuilder(
- '\OCA\News\Service\ItemService')
+ '\OCA\News\Service\ItemService'
+ )
->disableOriginalConstructor()
->getMock();
- $this->updater = new Updater($this->folderService,
+ $this->updater = new Updater(
+ $this->folderService,
$this->feedService,
- $this->itemService);
+ $this->itemService
+ );
}
- public function testBeforeUpdate() {
+ public function testBeforeUpdate()
+ {
$this->folderService->expects($this->once())
->method('purgeDeleted');
$this->feedService->expects($this->once())
@@ -50,13 +58,15 @@ class UpdaterTest extends \PHPUnit_Framework_TestCase {
}
- public function testAfterUpdate() {
+ public function testAfterUpdate()
+ {
$this->itemService->expects($this->once())
->method('autoPurgeOld');
$this->updater->afterUpdate();
}
- public function testUpdate() {
+ public function testUpdate()
+ {
$this->feedService->expects($this->once())
->method('updateAll');
$this->updater->update();