Skip to content

Commit 3275cf6

Browse files
committed
bug #597 Skip tests that require stty when it's not available (javiereguiluz)
This PR was merged into the master branch. Discussion ---------- Skip tests that require stty when it's not available This fixes #530. Commits ------- 1be9abb Skip tests that require stty when it's not available
2 parents 465dfd7 + 1be9abb commit 3275cf6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/AppBundle/Command/AddUserCommandTest.php

+10
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ class AddUserCommandTest extends KernelTestCase
2626
'full-name' => 'Chuck Norris',
2727
];
2828

29+
protected function setUp()
30+
{
31+
// check if stty is supported, because it's needed for questions with hidden answers
32+
exec('stty 2>&1', $output, $exitcode);
33+
34+
if (0 !== $exitcode) {
35+
$this->markTestSkipped('`stty` is required to test commands.');
36+
}
37+
}
38+
2939
/**
3040
* @dataProvider isAdminDataProvider
3141
*

0 commit comments

Comments
 (0)