| @@ 54-57 (lines=4) @@ | ||
| 51 | * @param string $expectOutput Expected output. |
|
| 52 | */ |
|
| 53 | public function testExecute( array $args, array $options, $expectExitCode, $expectOutput ) { |
|
| 54 | if ( isset( $options['composer.json'] ) ) { |
|
| 55 | file_put_contents( 'composer.json', json_encode( $options['composer.json'], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ) ); |
|
| 56 | unset( $options['composer.json'] ); |
|
| 57 | } |
|
| 58 | ||
| 59 | if ( isset( $args['--basedir'] ) && true === $args['--basedir'] ) { |
|
| 60 | $args['--basedir'] = getcwd(); |
|
| @@ 143-146 (lines=4) @@ | ||
| 140 | * @param string[] $expectOutputRegexes Regexes to run against the output. |
|
| 141 | */ |
|
| 142 | public function testExecute( array $args, array $options, array $inputs, $expectExitCode, $expectFile, $expectOutputRegexes = array() ) { |
|
| 143 | if ( isset( $options['composer.json'] ) ) { |
|
| 144 | file_put_contents( 'composer.json', json_encode( $options['composer.json'], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ) ); |
|
| 145 | unset( $options['composer.json'] ); |
|
| 146 | } |
|
| 147 | ||
| 148 | $tester = $this->getTester( 'add' ); |
|
| 149 | $tester->setInputs( $inputs ); |
|