|
|
|
|
@ -91,8 +91,8 @@ class VersionCheckTest extends \Test\TestCase {
|
|
|
|
|
$this->config
|
|
|
|
|
->expects($this->at(1))
|
|
|
|
|
->method('getSystemValue')
|
|
|
|
|
->with('updater.server.url', 'https://updates.owncloud.com/server/')
|
|
|
|
|
->willReturn('https://updates.owncloud.com/server/');
|
|
|
|
|
->with('updater.server.url', 'https://updates.nextcloud.com/server/')
|
|
|
|
|
->willReturn('https://updates.nextcloud.com/server/');
|
|
|
|
|
$this->config
|
|
|
|
|
->expects($this->at(2))
|
|
|
|
|
->method('setAppValue')
|
|
|
|
|
@ -122,7 +122,7 @@ class VersionCheckTest extends \Test\TestCase {
|
|
|
|
|
$this->updater
|
|
|
|
|
->expects($this->once())
|
|
|
|
|
->method('getUrlContent')
|
|
|
|
|
->with($this->buildUpdateUrl('https://updates.owncloud.com/server/'))
|
|
|
|
|
->with($this->buildUpdateUrl('https://updates.nextcloud.com/server/'))
|
|
|
|
|
->will($this->returnValue($updateXml));
|
|
|
|
|
|
|
|
|
|
$this->assertSame($expectedResult, $this->updater->check());
|
|
|
|
|
@ -137,8 +137,8 @@ class VersionCheckTest extends \Test\TestCase {
|
|
|
|
|
$this->config
|
|
|
|
|
->expects($this->at(1))
|
|
|
|
|
->method('getSystemValue')
|
|
|
|
|
->with('updater.server.url', 'https://updates.owncloud.com/server/')
|
|
|
|
|
->willReturn('https://updates.owncloud.com/server/');
|
|
|
|
|
->with('updater.server.url', 'https://updates.nextcloud.com/server/')
|
|
|
|
|
->willReturn('https://updates.nextcloud.com/server/');
|
|
|
|
|
$this->config
|
|
|
|
|
->expects($this->at(2))
|
|
|
|
|
->method('setAppValue')
|
|
|
|
|
@ -162,7 +162,7 @@ class VersionCheckTest extends \Test\TestCase {
|
|
|
|
|
$this->updater
|
|
|
|
|
->expects($this->once())
|
|
|
|
|
->method('getUrlContent')
|
|
|
|
|
->with($this->buildUpdateUrl('https://updates.owncloud.com/server/'))
|
|
|
|
|
->with($this->buildUpdateUrl('https://updates.nextcloud.com/server/'))
|
|
|
|
|
->will($this->returnValue($updateXml));
|
|
|
|
|
|
|
|
|
|
$this->assertSame([], $this->updater->check());
|
|
|
|
|
@ -184,8 +184,8 @@ class VersionCheckTest extends \Test\TestCase {
|
|
|
|
|
$this->config
|
|
|
|
|
->expects($this->at(1))
|
|
|
|
|
->method('getSystemValue')
|
|
|
|
|
->with('updater.server.url', 'https://updates.owncloud.com/server/')
|
|
|
|
|
->willReturn('https://updates.owncloud.com/server/');
|
|
|
|
|
->with('updater.server.url', 'https://updates.nextcloud.com/server/')
|
|
|
|
|
->willReturn('https://updates.nextcloud.com/server/');
|
|
|
|
|
$this->config
|
|
|
|
|
->expects($this->at(2))
|
|
|
|
|
->method('setAppValue')
|
|
|
|
|
@ -211,7 +211,7 @@ class VersionCheckTest extends \Test\TestCase {
|
|
|
|
|
$this->updater
|
|
|
|
|
->expects($this->once())
|
|
|
|
|
->method('getUrlContent')
|
|
|
|
|
->with($this->buildUpdateUrl('https://updates.owncloud.com/server/'))
|
|
|
|
|
->with($this->buildUpdateUrl('https://updates.nextcloud.com/server/'))
|
|
|
|
|
->will($this->returnValue($updateXml));
|
|
|
|
|
|
|
|
|
|
$this->assertSame($expectedResult, $this->updater->check());
|
|
|
|
|
@ -228,8 +228,8 @@ class VersionCheckTest extends \Test\TestCase {
|
|
|
|
|
$this->config
|
|
|
|
|
->expects($this->at(1))
|
|
|
|
|
->method('getSystemValue')
|
|
|
|
|
->with('updater.server.url', 'https://updates.owncloud.com/server/')
|
|
|
|
|
->willReturn('https://updates.owncloud.com/server/');
|
|
|
|
|
->with('updater.server.url', 'https://updates.nextcloud.com/server/')
|
|
|
|
|
->willReturn('https://updates.nextcloud.com/server/');
|
|
|
|
|
$this->config
|
|
|
|
|
->expects($this->at(2))
|
|
|
|
|
->method('setAppValue')
|
|
|
|
|
@ -253,7 +253,7 @@ class VersionCheckTest extends \Test\TestCase {
|
|
|
|
|
$this->updater
|
|
|
|
|
->expects($this->once())
|
|
|
|
|
->method('getUrlContent')
|
|
|
|
|
->with($this->buildUpdateUrl('https://updates.owncloud.com/server/'))
|
|
|
|
|
->with($this->buildUpdateUrl('https://updates.nextcloud.com/server/'))
|
|
|
|
|
->will($this->returnValue($updateXml));
|
|
|
|
|
|
|
|
|
|
$this->assertSame($expectedResult, $this->updater->check());
|
|
|
|
|
|