summaryrefslogtreecommitdiffstats
path: root/tests/lib/UpdaterTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/UpdaterTest.php')
-rw-r--r--tests/lib/UpdaterTest.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/lib/UpdaterTest.php b/tests/lib/UpdaterTest.php
index 643a18cc714..e45a9f08243 100644
--- a/tests/lib/UpdaterTest.php
+++ b/tests/lib/UpdaterTest.php
@@ -137,6 +137,12 @@ class UpdaterTest extends \Test\TestCase {
['8.1.0.0', '8.2.0.0', '8.1', true, true],
['8.2.0.1', '8.2.0.1', '8.1', true, true],
['8.3.0.0', '8.2.0.0', '8.1', true, true],
+
+ // Downgrade of maintenance
+ ['9.0.53.0', '9.0.4.0', '8.1', false, false, 'nextcloud'],
+ // with vendor switch
+ ['9.0.53.0', '9.0.4.0', '8.1', true, false, ''],
+ ['9.0.53.0', '9.0.4.0', '8.1', true, false, 'owncloud'],
];
}
@@ -148,12 +154,17 @@ class UpdaterTest extends \Test\TestCase {
* @param string $allowedVersion
* @param bool $result
* @param bool $debug
+ * @param string $vendor
*/
- public function testIsUpgradePossible($oldVersion, $newVersion, $allowedVersion, $result, $debug = false) {
+ public function testIsUpgradePossible($oldVersion, $newVersion, $allowedVersion, $result, $debug = false, $vendor = 'nextcloud') {
$this->config->expects($this->any())
->method('getSystemValue')
->with('debug', false)
->willReturn($debug);
+ $this->config->expects($this->any())
+ ->method('getAppValue')
+ ->with('core', 'vendor', '')
+ ->willReturn($vendor);
$this->assertSame($result, $this->updater->isUpgradePossible($oldVersion, $newVersion, $allowedVersion));
}