Browse Source

Add integration test to cover json output

Verified only if the output contain a common json simbols: list of
objects: [{

Signed-off-by: Vitor Mattos <vitor@php.rio>
pull/9067/head
Vitor Mattos 3 years ago
parent
commit
cb537d68eb
  1. 1
      lib/Command/Command/Add.php
  2. 1
      lib/Command/Command/Update.php
  3. 11
      tests/integration/features/command/command-list.feature

1
lib/Command/Command/Add.php

@ -40,6 +40,7 @@ class Add extends Base {
}
protected function configure(): void {
parent::configure();
$this
->setName('talk:command:add')
->setDescription('Add a new command')

1
lib/Command/Command/Update.php

@ -41,6 +41,7 @@ class Update extends Base {
}
protected function configure(): void {
parent::configure();
$this
->setName('talk:command:update')
->setDescription('Add a new command')

11
tests/integration/features/command/command-list.feature

@ -0,0 +1,11 @@
Feature: command/command-list
Scenario: List all available commands as plain text
Given invoking occ with "talk:command:list"
Then the command was successful
And the command output contains the text "Response values: 0 - No one"
Scenario: List all available commands as json
Given invoking occ with "talk:command:list --output=json"
Then the command was successful
And the command output contains the text "[{"
Loading…
Cancel
Save