diff --git a/tests/lib/updater.php b/tests/lib/updater.php
index 9935d7d11da2e5d01a6e828c8cf6c4944922b95b..8d6a9d65b27c1a35c0566d05bd66ad4e7d09aad5 100644
--- a/tests/lib/updater.php
+++ b/tests/lib/updater.php
@@ -54,6 +54,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
 	 */
@@ -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());