Skip to content

Commit 7639576

Browse files
authored
Code rebuild command fix. (#2694)
* Fix command. * Add test for code-rebuild command.
1 parent 9fa00c9 commit 7639576

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/Commands/Env/CodeRebuildCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function rebuild(
3737
$site_env
3838
) {
3939
$this->requireSiteIsNotFrozen($site_env);
40-
$site = $this->getSite($site_env);
40+
$site = $this->getSiteById($site_env);
4141
$env = $this->getEnv($site_env);
4242

4343
if ($env->getName() === 'test' || $env->getName() === 'live') {

tests/Functional/EnvCommandsTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,4 +471,18 @@ public function testViewCommand()
471471
);
472472
$this->assertEquals($expectedUrl, $url);
473473
}
474+
475+
/**
476+
* @test
477+
* @covers \Pantheon\Terminus\Commands\Env\CodeRebuildCommand
478+
*
479+
* @group env
480+
* @group short
481+
*/
482+
public function testCodeRebuild()
483+
{
484+
$this->terminus(
485+
sprintf('env:code-rebuild %s', $this->getSiteEnv())
486+
);
487+
}
474488
}

0 commit comments

Comments
 (0)