[Pkg-owncloud-commits] [owncloud] 160/205: Build base URL
David Prévot
taffit at moszumanska.debian.org
Thu Jul 2 17:37:08 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch stable8
in repository owncloud.
commit 03498c0b2c7b2c4052293b12402c3dea884fe47e
Author: Lukas Reschke <lukas at owncloud.com>
Date: Sun Jun 28 12:26:47 2015 +0200
Build base URL
---
tests/lib/updater.php | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/tests/lib/updater.php b/tests/lib/updater.php
index 9935d7d..8d6a9d6 100644
--- a/tests/lib/updater.php
+++ b/tests/lib/updater.php
@@ -55,6 +55,14 @@ class UpdaterTest extends \Test\TestCase {
}
/**
+ * @param string $baseUrl
+ * @return string
+ */
+ private function buildUpdateUrl($baseUrl) {
+ return $baseUrl . '?version='.implode('x', \OC_Util::getVersion()).'xinstalledatxlastupdatedatx'.\OC_Util::getChannel().'x'.\OC_Util::getEditionString().'x';
+ }
+
+ /**
* @return array
*/
public function versionCompatibilityTestData() {
@@ -167,7 +175,7 @@ class UpdaterTest extends \Test\TestCase {
$this->httpHelper
->expects($this->once())
->method('getUrlContent')
- ->with('https://updates.owncloud.com/server/?version=8x1x0x7xinstalledatxlastupdatedatxgitxEnterprisex')
+ ->with($this->buildUpdateUrl('https://updates.owncloud.com/server/'))
->will($this->returnValue($updateXml));
$this->assertSame($expectedResult, $this->updater->check());
@@ -202,7 +210,7 @@ class UpdaterTest extends \Test\TestCase {
$this->httpHelper
->expects($this->once())
->method('getUrlContent')
- ->with('https://updates.owncloud.com/server/?version=8x1x0x7xinstalledatxlastupdatedatxgitxEnterprisex')
+ ->with($this->buildUpdateUrl('https://updates.owncloud.com/server/'))
->will($this->returnValue($updateXml));
$this->assertSame([], $this->updater->check());
@@ -250,7 +258,7 @@ class UpdaterTest extends \Test\TestCase {
$this->httpHelper
->expects($this->once())
->method('getUrlContent')
- ->with('https://myupdater.com/?version=8x1x0x7xinstalledatxlastupdatedatxgitxEnterprisex')
+ ->with($this->buildUpdateUrl('https://myupdater.com/'))
->will($this->returnValue($updateXml));
$this->assertSame($expectedResult, $this->updater->check('https://myupdater.com/'));
@@ -294,7 +302,7 @@ class UpdaterTest extends \Test\TestCase {
$this->httpHelper
->expects($this->once())
->method('getUrlContent')
- ->with('https://updates.owncloud.com/server/?version=8x1x0x7xinstalledatxlastupdatedatxgitxEnterprisex')
+ ->with($this->buildUpdateUrl('https://updates.owncloud.com/server/'))
->will($this->returnValue($updateXml));
$this->assertSame($expectedResult, $this->updater->check());
@@ -331,7 +339,7 @@ class UpdaterTest extends \Test\TestCase {
$this->httpHelper
->expects($this->once())
->method('getUrlContent')
- ->with('https://updates.owncloud.com/server/?version=8x1x0x7xinstalledatxlastupdatedatxgitxEnterprisex')
+ ->with($this->buildUpdateUrl('https://updates.owncloud.com/server/'))
->will($this->returnValue($updateXml));
$this->assertSame($expectedResult, $this->updater->check());
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list