Skip to content
This repository was archived by the owner on Apr 20, 2021. It is now read-only.

Commit ae90d9b

Browse files
committed
Merge branch 'geoffrey-brier-feature/dump-command-output'
2 parents bf6f1fc + 8698e37 commit ae90d9b

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

i18n/en.xliff.dist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@
145145
<source>(I )execute :command from project root</source>
146146
<target></target>
147147
</trans-unit>
148+
<trans-unit id="i-display-the-last-command-output">
149+
<source>(I )display the last command output</source>
150+
<target></target>
151+
</trans-unit>
148152
<trans-unit id="command-should-succeed">
149153
<source>command should succeed</source>
150154
<target></target>

src/Context/SystemContext.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ public function iExecuteFromProjectRoot($cmd)
4848
$this->iExecute($cmd);
4949
}
5050

51+
/**
52+
* Display the last command output
53+
*
54+
* @Then (I )display the last command output
55+
*/
56+
public function iDumpCommandOutput()
57+
{
58+
echo implode(PHP_EOL, $this->output);
59+
}
60+
5161
/**
5262
* Command should succeed
5363
*

tests/features/system.feature

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ Feature: System feature
1313
Given I execute "sleep 2"
1414
Then Command should last more than 1 seconds
1515

16+
Scenario: Testing displaying output
17+
Given I execute "echo 'Hello world'"
18+
Then display the last command output
19+
1620
Scenario: Testing execution output
1721
Given I execute "echo 'Hello world'"
1822
Then output should contain "Hello world"

0 commit comments

Comments
 (0)