Skip to content

Commit

Permalink
Add test for clients without secret
Browse files Browse the repository at this point in the history
  • Loading branch information
dkreuer authored Mar 9, 2020
1 parent c3c8e50 commit 011131d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Tests/Acceptance/ListClientsCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,28 @@ public function testListClients(): void
$this->assertEquals(trim($expected), trim($output));
}

public function testListClientsWithClientHavingNoSecret(): void
{
$client = $this->fakeAClient('foobar', null);
$this->getClientManager()->save($client);

$command = $this->command();
$commandTester = new CommandTester($command);
$commandTester->execute([
'command' => $command->getName(),
]);
$output = $commandTester->getDisplay();
$expected = <<<TABLE
------------ -------- ------- -------------- ------------
identifier secret scope redirect uri grant type
------------ -------- ------- -------------- ------------
foobar
------------ -------- ------- -------------- ------------
TABLE;

$this->assertEquals(trim($expected), trim($output));
}

public function testListClientsEmpty(): void
{
$command = $this->command();
Expand Down

0 comments on commit 011131d

Please sign in to comment.