Skip to content

Commit

Permalink
Adds in filter/sort/limit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
typhonius committed Mar 21, 2020
1 parent a57fc90 commit bf47533
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/AcquiaCliApplicationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,30 @@ public function testVersion()
$this->assertSame('AcquiaCli 2.0.0-dev' . PHP_EOL, $actualValue);
}

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

$this->execute($command);

$expectedQuery = [
'limit' => '2',
'sort' => 'label',
'filter' => 'label=@*sample*'
];

$actualQuery = $this->client->getQuery();
$this->assertEqual($expectedQuery, $actualQuery);
}

public function testCloudApi()
{

$config = new Config($this->root);
$cloudApi = new CloudApi($config, $this->client);

$this->assertInstanceOf('\AcquiaCloudApi\Connector\Client', $cloudApi->getClient());

$applicationUuid = $cloudApi->getApplicationUuid('devcloud:devcloud2');
$this->assertSame('a47ac10b-58cc-4372-a567-0e02b2c3d470', $applicationUuid);

Expand Down

0 comments on commit bf47533

Please sign in to comment.