41 if ( preg_match(
'/^sudo /', $testCommand ) ) {
42 if ( Shell::command(
'sudo',
'-n',
'ls',
'/' )->
execute()->getExitCode() ) {
43 $this->markTestSkipped(
'need passwordless sudo' );
49 ->unsafeParams( $testCommand )
54 ->restrict( $flag === Shell::NO_NETWORK ? Shell::PRIVATE_DEV : Shell::NO_NETWORK );
56 $this->assertSame( 0, $result->getExitCode(),
'sanity check' );
60 ->unsafeParams( $testCommand )
63 $this->assertNotSame( 0, $result->getExitCode(),
'real check' );