Skip to content

Commit 1be9abb

Browse files
committed
Skip tests that require stty when it's not available
1 parent c63ad95 commit 1be9abb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/AppBundle/Command/AddUserCommandTest.php

Lines changed: 10 additions & 0 deletions
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)