Skip to content

Commit

Permalink
BUGS-8304: Restore filter hooks (#2607)
Browse files Browse the repository at this point in the history
* Failing test: ensure that help output for site:list command contains --filter option.

* Restore filter hooks.
  • Loading branch information
greg-1-anderson authored Jun 13, 2024
1 parent 510a77a commit 5ced720
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Terminus.php
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,9 @@ private function addBuiltInCommandsAndHooks()
'Pantheon\\Terminus\\Commands\\Workflow\\WaitCommand',
'Pantheon\\Terminus\\Commands\\Workflow\\WatchCommand'
];

// Add in any static additions not handled by 'composer update-class-lists'
$this->commands[] = 'Consolidation\\Filter\\Hooks\\FilterHooks';
}

/**
Expand Down
13 changes: 13 additions & 0 deletions tests/Functional/SiteCommandsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,19 @@ public function testSiteOrgListCommand()
$this->assertGreaterThan(0, count($orgList));
}

/**
* @test
* @covers \Consolidation\Filter\Hooks\FilterHooks
*
* @group site
* @group short
*/
public function testSiteListFilterOption()
{
$siteListHelpOutput = $this->terminus('help site:list');
$this->assertStringContainsString('--filter[=FILTER]', $siteListHelpOutput);
}

/**
* Test site:create command.
*
Expand Down

0 comments on commit 5ced720

Please sign in to comment.