Skip to content

Commit

Permalink
Merge 0dd8a53 into 14bcdc2
Browse files Browse the repository at this point in the history
  • Loading branch information
typhonius committed Apr 3, 2020
2 parents 14bcdc2 + 0dd8a53 commit d2ad4d8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/AcquiaCliApplicationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
use AcquiaCli\Cli\AcquiaCli;
use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\Stopwatch\Stopwatch;
use Symfony\Component\Console\Command\LockableTrait;

class AcquiaCliApplicationTest extends AcquiaCliTestCase
{
use LockableTrait;

private $root;

public function setUp()
Expand Down Expand Up @@ -49,6 +52,18 @@ public function testVersion()
$this->assertContains('AcquiaCli 2', $actualValue);
}

public function testLock()
{
// Obtain an identical lock and then attempt to run acquiacli.
$this->lock('acquia-cli-command');
$command = ['--version'];
$actualValue = $this->execute($command);
$this->assertContains('The command is already running in another process.', $actualValue);

// Unlock to ensure tests are able to continue.
$this->release();
}

public function testClientOptions()
{
$command = ['application:list', '--sort=label', '--filter=label=@*sample*', '--limit=2'];
Expand Down

0 comments on commit d2ad4d8

Please sign in to comment.