Fix AppSettingsControllerTest

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2018-06-06 11:24:32 +02:00
parent f30c14a6a2
commit 23ca2a4429
No known key found for this signature in database
GPG key ID: 4C614C6ED2CDE6DF

View file

@ -176,6 +176,9 @@ class AppSettingsControllerTest extends TestCase {
public function testViewApps() {
$this->bundleFetcher->expects($this->once())->method('getBundles')->willReturn([]);
$this->installer->expects($this->any())
->method('isUpdateAvailable')
->willReturn(false);
$this->config
->expects($this->once())
->method('getSystemValue')
@ -193,9 +196,8 @@ class AppSettingsControllerTest extends TestCase {
'settings',
[
'serverData' => [
'updateCount' => 67,
'updateCount' => 0,
'appstoreEnabled' => true,
'urlGenerator' => $this->urlGenerator,
'bundles' => [],
'developerDocumentation' => ''
]
@ -207,6 +209,9 @@ class AppSettingsControllerTest extends TestCase {
}
public function testViewAppsAppstoreNotEnabled() {
$this->installer->expects($this->any())
->method('isUpdateAvailable')
->willReturn(false);
$this->bundleFetcher->expects($this->once())->method('getBundles')->willReturn([]);
$this->config
->expects($this->once())
@ -225,9 +230,8 @@ class AppSettingsControllerTest extends TestCase {
'settings',
[
'serverData' => [
'updateCount' => 67,
'updateCount' => 0,
'appstoreEnabled' => false,
'urlGenerator' => $this->urlGenerator,
'bundles' => [],
'developerDocumentation' => ''
]