Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Command/CommandBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -1517,6 +1517,10 @@
foreach ($acsfSites['sites'] as $domain => $acsfSite) {
$choices[] = "{$acsfSite['name']} ($domain)";
}
if (!count($choices)) {
throw new AcquiaCliException("Could not get ACSF sites");

Check warning on line 1521 in src/Command/CommandBase.php

View check run for this annotation

Codecov / codecov/patch

src/Command/CommandBase.php#L1521

Added line #L1521 was not covered by tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to add a test case to cover this line. I'd suggest copying testRefreshAcsfFiles from PullFilesCommandTest.php and modify it to expect this exception. You'll need to modify mockGetAcsfSites() to return 0 sites to trigger the exception.

}

$choice = $this->io->choice('Choose a site', $choices, $choices[0]);
$key = array_search($choice, $choices, true);
$sites = array_values($acsfSites['sites']);
Expand Down
Loading