Skip to content

Commit

Permalink
Update tests to use uppercase answer
Browse files Browse the repository at this point in the history
Somehow with lowercase it works on local (macos and linux) but fails
on Travis. Update to uppercase as it is the option provided in choice
question.

Signed-off-by: Michał Bundyra <contact@webimpress.com>
  • Loading branch information
michalbundyra committed May 1, 2020
1 parent ccc71ef commit 0a50bbf
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions test/ApplicationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private function getApplication(array $exitCodes = []) : Application
public function chainAnswer() : Generator
{
yield 'execute whole chain' => [
['y', 'y', 'y'],
['Y', 'Y', 'Y'],
[
ExampleCommand::class . ': arg=foo, opt=bar',
Chained1Command::class . ': arg=foo, opt=bar',
Expand All @@ -85,7 +85,7 @@ public function chainAnswer() : Generator
];

yield 'skip first chained' => [
['s', 'y'],
['s', 'Y'],
[
ExampleCommand::class . ': arg=foo, opt=bar',
'Skipping example:chained-1',
Expand All @@ -98,7 +98,7 @@ public function chainAnswer() : Generator
];

yield 'skip second chained' => [
['y', 's', 'y'],
['Y', 's', 'Y'],
[
ExampleCommand::class . ': arg=foo, opt=bar',
Chained1Command::class . ': arg=foo, opt=bar',
Expand All @@ -111,7 +111,7 @@ public function chainAnswer() : Generator
];

yield 'skip third chained' => [
['y', 'y', 's'],
['Y', 'Y', 's'],
[
ExampleCommand::class . ': arg=foo, opt=bar',
Chained1Command::class . ': arg=foo, opt=bar',
Expand All @@ -124,7 +124,7 @@ public function chainAnswer() : Generator
];

yield 'skip second and third chained' => [
['y', 's', 's'],
['Y', 's', 's'],
[
ExampleCommand::class . ': arg=foo, opt=bar',
Chained1Command::class . ': arg=foo, opt=bar',
Expand Down Expand Up @@ -165,7 +165,7 @@ public function chainAnswer() : Generator
];

yield 'break on second chained' => [
['y', 'n', 'y'],
['Y', 'n', 'Y'],
[
ExampleCommand::class . ': arg=foo, opt=bar',
Chained1Command::class . ': arg=foo, opt=bar',
Expand All @@ -178,7 +178,7 @@ public function chainAnswer() : Generator
];

yield 'break on second chained, skip third' => [
['y', 'n', 's'],
['Y', 'n', 's'],
[
ExampleCommand::class . ': arg=foo, opt=bar',
Chained1Command::class . ': arg=foo, opt=bar',
Expand Down Expand Up @@ -206,7 +206,7 @@ public function chainAnswer() : Generator
];

yield 'exit on first chained command' => [
['y'],
['Y'],
[
ExampleCommand::class . ': arg=foo, opt=bar',
Chained1Command::class . ': arg=foo, opt=bar',
Expand All @@ -219,7 +219,7 @@ public function chainAnswer() : Generator
];

yield 'exit on second chained command' => [
['y', 'y'],
['Y', 'Y'],
[
ExampleCommand::class . ': arg=foo, opt=bar',
Chained1Command::class . ': arg=foo, opt=bar',
Expand Down Expand Up @@ -302,7 +302,7 @@ public function testPassCustomParams()
$application = $applicationFactory($container);

$applicationTester = new ApplicationTester($application);
$applicationTester->setInputs(['y']);
$applicationTester->setInputs(['Y']);
$statusCode = $applicationTester->run(
[
'command' => 'example:command-name',
Expand Down Expand Up @@ -359,7 +359,7 @@ public function testCustomInputMapper()
$application = $applicationFactory($container);

$applicationTester = new ApplicationTester($application);
$applicationTester->setInputs(['y']);
$applicationTester->setInputs(['Y']);
$statusCode = $applicationTester->run(
[
'command' => 'example:command-name',
Expand Down Expand Up @@ -389,7 +389,7 @@ public function testList()
$application = $this->getApplication();

$applicationTester = new ApplicationTester($application);
$applicationTester->setInputs(['y']);
$applicationTester->setInputs(['Y']);
$statusCode = $applicationTester->run(['command' => 'list']);

$display = $applicationTester->getDisplay();
Expand Down

0 comments on commit 0a50bbf

Please sign in to comment.