Skip to content

Commit

Permalink
Merge pull request #35372 from owncloud/stable10-get-enabled-disabled…
Browse files Browse the repository at this point in the history
…-improve

[Stable10] Get enabled and disabled apps from same request in acceptance tests
  • Loading branch information
phil-davis authored May 30, 2019
2 parents 478cb6d + 16f55bc commit 7b0b9c5
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions tests/acceptance/features/bootstrap/Provisioning.php
Original file line number Diff line number Diff line change
Expand Up @@ -2816,8 +2816,16 @@ public function cleanupGroups() {
* @return void
*/
public function rememberAppEnabledDisabledState() {
$this->enabledApps = $this->getEnabledApps();
$this->disabledApps = $this->getDisabledApps();
SetupHelper::init(
$this->getAdminUsername(),
$this->getAdminPassword(),
$this->getBaseUrl(),
$this->getOcPath()
);
$this->runOcc(['app:list', '--output json']);
$apps = \json_decode($this->getStdOutOfOccCommand(), true);
$this->enabledApps = \array_keys($apps["enabled"]);
$this->disabledApps = \array_keys($apps["disabled"]);
}

/**
Expand All @@ -2826,8 +2834,10 @@ public function rememberAppEnabledDisabledState() {
* @return void
*/
public function restoreAppEnabledDisabledState() {
$currentlyDisabledApps = $this->getDisabledApps();
$currentlyEnabledApps = $this->getEnabledApps();
$this->runOcc(['app:list', '--output json']);
$apps = \json_decode($this->getStdOutOfOccCommand(), true);
$currentlyEnabledApps = \array_keys($apps["enabled"]);
$currentlyDisabledApps = \array_keys($apps["disabled"]);

foreach ($currentlyDisabledApps as $disabledApp) {
if (\in_array($disabledApp, $this->enabledApps)) {
Expand Down

0 comments on commit 7b0b9c5

Please sign in to comment.