diff options
author | Reedy <reedy@wikimedia.org> | 2019-03-29 20:12:24 +0000 |
---|---|---|
committer | Reedy <reedy@wikimedia.org> | 2019-04-04 19:02:22 +0000 |
commit | c13fee87d42bdd6fdf6764edb6f6475c14c27749 (patch) | |
tree | eba762d5e2ec17b51994ea109e24b55f277158ea /tests/integration | |
parent | 9fc202b69496353a1142a692be5aaf158e9ea30c (diff) | |
download | mediawikicore-c13fee87d42bdd6fdf6764edb6f6475c14c27749.tar.gz mediawikicore-c13fee87d42bdd6fdf6764edb6f6475c14c27749.zip |
Collapse some nested if statements
Change-Id: I9a97325d738d09370d29d35d5254bc0dadc57ff4
Diffstat (limited to 'tests/integration')
-rw-r--r-- | tests/integration/includes/shell/FirejailCommandIntegrationTest.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/integration/includes/shell/FirejailCommandIntegrationTest.php b/tests/integration/includes/shell/FirejailCommandIntegrationTest.php index 47300051a138..3c7cb143823a 100644 --- a/tests/integration/includes/shell/FirejailCommandIntegrationTest.php +++ b/tests/integration/includes/shell/FirejailCommandIntegrationTest.php @@ -40,10 +40,10 @@ class FirejailCommandIntegrationTest extends PHPUnit\Framework\TestCase { * @dataProvider provideExecute */ public function testExecute( $testCommand, $flag ) { - if ( preg_match( '/^sudo /', $testCommand ) ) { - if ( Shell::command( 'sudo', '-n', 'ls', '/' )->execute()->getExitCode() ) { - $this->markTestSkipped( 'need passwordless sudo' ); - } + if ( preg_match( '/^sudo /', $testCommand ) + && Shell::command( 'sudo', '-n', 'ls', '/' )->execute()->getExitCode() + ) { + $this->markTestSkipped( 'need passwordless sudo' ); } $command = new FirejailCommand( 'firejail' ); |