Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
  • Loading branch information
LukasReschke committed May 20, 2017
1 parent 4bf9df9 commit 8cc89c1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/lib/App/AppManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function testNotEnableIfNotInstalled() {
$this->assertEquals('no', $this->appConfig->getValue(
'some_random_name_which_i_hope_is_not_an_app', 'enabled', 'no'
));
}
}

public function testEnableAppForGroups() {
$groups = array(
Expand Down Expand Up @@ -338,6 +338,7 @@ public function testGetInstalledApps() {
'test3',
'twofactor_backupcodes',
'workflowengine',
'oauth2',
];
$this->assertEquals($apps, $this->manager->getInstalledApps());
}
Expand All @@ -362,7 +363,8 @@ public function testGetAppsForUser() {
'test1',
'test3',
'twofactor_backupcodes',
'workflowengine'
'workflowengine',
'oauth2',
];
$this->assertEquals($enabled, $this->manager->getEnabledAppsForUser($user));
}
Expand All @@ -387,6 +389,7 @@ public function testGetAppsNeedingUpgrade() {
'testnoversion' => ['id' => 'testnoversion', 'requiremin' => '8.2.0'],
'twofactor_backupcodes' => ['id' => 'twofactor_backupcodes'],
'workflowengine' => ['id' => 'workflowengine'],
'oauth2' => ['id' => 'oauth2'],
];

$manager->expects($this->any())
Expand All @@ -395,7 +398,7 @@ public function testGetAppsNeedingUpgrade() {
function($appId) use ($appInfos) {
return $appInfos[$appId];
}
));
));

$this->appConfig->setValue('test1', 'enabled', 'yes');
$this->appConfig->setValue('test1', 'installed_version', '1.0.0');
Expand Down Expand Up @@ -432,6 +435,7 @@ public function testGetIncompatibleApps() {
'testnoversion' => ['id' => 'testnoversion', 'requiremin' => '8.2.0'],
'twofactor_backupcodes' => ['id' => 'twofactor_backupcodes'],
'workflowengine' => ['id' => 'workflowengine'],
'oauth2' => ['id' => 'oauth2'],
];

$manager->expects($this->any())
Expand All @@ -440,7 +444,7 @@ public function testGetIncompatibleApps() {
function($appId) use ($appInfos) {
return $appInfos[$appId];
}
));
));

$this->appConfig->setValue('test1', 'enabled', 'yes');
$this->appConfig->setValue('test2', 'enabled', 'yes');
Expand Down

0 comments on commit 8cc89c1

Please sign in to comment.