From 011131dfce88baab49aaf3964dd50f68f0f630bc Mon Sep 17 00:00:00 2001 From: Daniel Kreuer Date: Tue, 10 Mar 2020 00:10:47 +0100 Subject: [PATCH] Add test for clients without secret --- Tests/Acceptance/ListClientsCommandTest.php | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Tests/Acceptance/ListClientsCommandTest.php b/Tests/Acceptance/ListClientsCommandTest.php index 67b5782f..30effb63 100644 --- a/Tests/Acceptance/ListClientsCommandTest.php +++ b/Tests/Acceptance/ListClientsCommandTest.php @@ -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 = <<assertEquals(trim($expected), trim($output)); + } + public function testListClientsEmpty(): void { $command = $this->command();