diff options
author | Joas Schilling <coding@schilljs.com> | 2016-07-22 14:44:00 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-07-22 14:51:43 +0200 |
commit | 5c343464799346a1caf0cd6540e7d6510df255c6 (patch) | |
tree | 37b3cfdfbf7727636fa07359da2bf7d47715aa9a /tests/lib/UpdaterTest.php | |
parent | af3950146504fe0a14ef38c24c549ffeda74acf6 (diff) | |
download | nextcloud-server-5c343464799346a1caf0cd6540e7d6510df255c6.tar.gz nextcloud-server-5c343464799346a1caf0cd6540e7d6510df255c6.zip |
Allow downgrades of maintenance accross vendors
Diffstat (limited to 'tests/lib/UpdaterTest.php')
-rw-r--r-- | tests/lib/UpdaterTest.php | 13 |
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)); } |