Revert "Fix tests"
This reverts commit 997e4cf3fe
.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
7a135d8d81
commit
8c133451ac
|
@ -46,14 +46,13 @@ class UpdateCheckerTest extends TestCase {
|
||||||
->method('check')
|
->method('check')
|
||||||
->willReturn([
|
->willReturn([
|
||||||
'version' => 123,
|
'version' => 123,
|
||||||
'versionstring' => 'Nextcloud 123',
|
'versionstring' => 'ownCloud 123',
|
||||||
'web'=> 'javascript:alert(1)',
|
'web'=> 'javascript:alert(1)',
|
||||||
'url'=> 'javascript:alert(2)',
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$expected = [
|
$expected = [
|
||||||
'updateAvailable' => true,
|
'updateAvailable' => true,
|
||||||
'updateVersion' => 'Nextcloud 123',
|
'updateVersion' => 'ownCloud 123',
|
||||||
];
|
];
|
||||||
$this->assertSame($expected, $this->updateChecker->getUpdateState());
|
$this->assertSame($expected, $this->updateChecker->getUpdateState());
|
||||||
}
|
}
|
||||||
|
@ -64,16 +63,14 @@ class UpdateCheckerTest extends TestCase {
|
||||||
->method('check')
|
->method('check')
|
||||||
->willReturn([
|
->willReturn([
|
||||||
'version' => 123,
|
'version' => 123,
|
||||||
'versionstring' => 'Nextcloud 123',
|
'versionstring' => 'ownCloud 123',
|
||||||
'web'=> 'https://docs.nextcloud.com/myUrl',
|
'web'=> 'https://owncloud.org/myUrl',
|
||||||
'url'=> 'https://downloads.nextcloud.org/server',
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$expected = [
|
$expected = [
|
||||||
'updateAvailable' => true,
|
'updateAvailable' => true,
|
||||||
'updateVersion' => 'Nextcloud 123',
|
'updateVersion' => 'ownCloud 123',
|
||||||
'updateLink' => 'https://docs.nextcloud.com/myUrl',
|
'updateLink' => 'https://owncloud.org/myUrl',
|
||||||
'downloadLink' => 'https://downloads.nextcloud.org/server',
|
|
||||||
];
|
];
|
||||||
$this->assertSame($expected, $this->updateChecker->getUpdateState());
|
$this->assertSame($expected, $this->updateChecker->getUpdateState());
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,7 +127,6 @@ class AdminControllerTest extends TestCase {
|
||||||
'channels' => $channels,
|
'channels' => $channels,
|
||||||
'newVersionString' => '8.1.2',
|
'newVersionString' => '8.1.2',
|
||||||
'updaterRequirementsFulfilled' => true,
|
'updaterRequirementsFulfilled' => true,
|
||||||
'downloadLink' => '',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
$expected = new TemplateResponse('updatenotification', 'admin', $params, '');
|
$expected = new TemplateResponse('updatenotification', 'admin', $params, '');
|
||||||
|
@ -161,10 +160,7 @@ class AdminControllerTest extends TestCase {
|
||||||
$this->updateChecker
|
$this->updateChecker
|
||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
->method('getUpdateState')
|
->method('getUpdateState')
|
||||||
->willReturn([
|
->willReturn(['updateVersion' => '8.1.2']);
|
||||||
'updateVersion' => '8.1.2',
|
|
||||||
'downloadLink' => 'https://downloads.nextcloud.org/server',
|
|
||||||
]);
|
|
||||||
$this->adminController
|
$this->adminController
|
||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
->method('isCompatibleWithUpdater')
|
->method('isCompatibleWithUpdater')
|
||||||
|
@ -177,7 +173,6 @@ class AdminControllerTest extends TestCase {
|
||||||
'channels' => $channels,
|
'channels' => $channels,
|
||||||
'newVersionString' => '8.1.2',
|
'newVersionString' => '8.1.2',
|
||||||
'updaterRequirementsFulfilled' => false,
|
'updaterRequirementsFulfilled' => false,
|
||||||
'downloadLink' => 'https://downloads.nextcloud.org/server',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
$expected = new TemplateResponse('updatenotification', 'admin', $params, '');
|
$expected = new TemplateResponse('updatenotification', 'admin', $params, '');
|
||||||
|
@ -224,7 +219,6 @@ class AdminControllerTest extends TestCase {
|
||||||
'channels' => $channels,
|
'channels' => $channels,
|
||||||
'newVersionString' => '',
|
'newVersionString' => '',
|
||||||
'updaterRequirementsFulfilled' => true,
|
'updaterRequirementsFulfilled' => true,
|
||||||
'downloadLink' => '',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
$expected = new TemplateResponse('updatenotification', 'admin', $params, '');
|
$expected = new TemplateResponse('updatenotification', 'admin', $params, '');
|
||||||
|
|
Loading…
Reference in New Issue