summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBernhard Posselt <BernhardPosselt@users.noreply.github.com>2016-08-25 22:51:41 +0200
committerGitHub <noreply@github.com>2016-08-25 22:51:41 +0200
commit0daa9425b68f0035887c169aed2e92d1aca6fea2 (patch)
tree193b4911732037c878350c397319d5d816a15317 /tests
parent0f0923f8790e9c53bdd45ecd28b70efde6b6b230 (diff)
Delete UpgradeTest.php
Diffstat (limited to 'tests')
-rw-r--r--tests/Unit/Upgrade/UpgradeTest.php72
1 files changed, 0 insertions, 72 deletions
diff --git a/tests/Unit/Upgrade/UpgradeTest.php b/tests/Unit/Upgrade/UpgradeTest.php
deleted file mode 100644
index a3d473b63..000000000
--- a/tests/Unit/Upgrade/UpgradeTest.php
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-/**
- * Created by IntelliJ IDEA.
- * User: bernhard
- * Date: 11/26/15
- * Time: 7:40 PM
- */
-
-namespace OCA\News\Upgrade;
-
-use OCP\IConfig;
-use OCA\News\Service\ItemService;
-
-class UpgradeTest extends \PHPUnit_Framework_TestCase {
-
- /** @var Upgrade */
- private $upgrade;
-
- /** @var ItemService */
- private $service;
-
- /** @var IConfig */
- private $config;
-
- /** @var IDBConnection */
- private $db;
-
- public function setUp() {
- $this->config = $this->getMockBuilder(
- '\OCP\IConfig')
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->db = $this->getMockBuilder(
- '\OCP\IDBConnection')
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->service = $this->getMockBuilder(
- '\OCA\News\Service\ItemService')
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->upgrade = new Upgrade($this->config, $this->service,
- $this->db, 'news');
- }
-
- public function testUpgrade() {
- $this->config->expects($this->once())
- ->method('getAppValue')
- ->with($this->equalTo('news'), $this->equalTo('installed_version'))
- ->will($this->returnValue('8.9.0'));
-
- $this->service->expects($this->once())
- ->method('generateSearchIndices');
-
- $this->upgrade->upgrade();
- }
-
- public function testNoUpgrade() {
- $this->config->expects($this->once())
- ->method('getAppValue')
- ->with($this->equalTo('news'), $this->equalTo('installed_version'))
- ->will($this->returnValue('8.9.1'));
-
- $this->service->expects($this->never())
- ->method('generateSearchIndices');
-
- $this->upgrade->upgrade();
- }
-
-}