Skip to content

Commit

Permalink
Change site label Alias (#2629)
Browse files Browse the repository at this point in the history
* change site label status

* update test

* review comments
  • Loading branch information
stovak authored Sep 18, 2024
1 parent fcf8427 commit c29bf71
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion bin/terminus
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if (!getenv('TERMINUS_ALLOW_UNSUPPORTED_NEWER_PHP') && version_compare(PHP_VERSI

// This variable is automatically managed via updateDependenciesversion() in /RoboFile.php,
// which is run after every call to composer update.
$terminusPluginsDependenciesVersion = 'e47112adb1';
$terminusPluginsDependenciesVersion = 'a6b56bb299';

// Cannot use $_SERVER superglobal since that's empty during phpunit testing
// getenv('HOME') isn't set on Windows and generates a Notice.
Expand Down
22 changes: 11 additions & 11 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/Commands/Site/LabelCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ class LabelCommand extends SiteCommand
*
* @authorize
*
* @command site:label
* @command site:label:set
* @alias set-label
* @alias slbl
*
* @param string $site_name Site name
* @param string $label Site label
Expand Down
1 change: 1 addition & 0 deletions src/Terminus.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ private function addBuiltInCommandsAndHooks()
// List of all hooks and commands. Update via 'composer update-class-lists'
$this->commands = [
'Pantheon\\Terminus\\Hooks\\Authorizer',
'Pantheon\\Terminus\\Hooks\\CommandTracker',
'Pantheon\\Terminus\\Hooks\\RoleValidator',
'Pantheon\\Terminus\\Hooks\\SiteEnvLookup',
'Pantheon\\Terminus\\Commands\\AliasesCommand',
Expand Down
4 changes: 2 additions & 2 deletions tests/Functional/SiteCommandsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function testSiteInfoNoArgCommand()
public function testSiteLabelCommand()
{
$label = uniqid('test-label');
$command = sprintf('site:label %s "%s"', $this->getSiteName(), $label);
$command = sprintf('site:label:set %s "%s"', $this->getSiteName(), $label);
$this->terminus(
$command,
['--yes']
Expand All @@ -139,7 +139,7 @@ public function testSiteLabelCommand()
$this->assertArrayHasKey('label', $siteInfo);
$this->assertEquals($label, $siteInfo['label']);
// Change it back
$command = sprintf('site:label %s "%s"', $this->getSiteName(), $this->getSiteName());
$command = sprintf('site:label:set %s "%s"', $this->getSiteName(), $this->getSiteName());
$this->terminus(
$command,
['--yes']
Expand Down

0 comments on commit c29bf71

Please sign in to comment.