| @@ 45-48 (lines=4) @@ | ||
| 42 | * @param string $expectOutput Expected output. |
|
| 43 | */ |
|
| 44 | public function testExecute( array $args, array $options, $expectExitCode, $expectOutput ) { |
|
| 45 | if ( isset( $options['composer.json'] ) ) { |
|
| 46 | file_put_contents( 'composer.json', json_encode( array( 'extra' => array( 'changelogger' => $options['composer.json'] ) ), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ) ); |
|
| 47 | unset( $options['composer.json'] ); |
|
| 48 | } |
|
| 49 | if ( isset( $options['CHANGELOG.md'] ) ) { |
|
| 50 | file_put_contents( 'CHANGELOG.md', $options['CHANGELOG.md'] ); |
|
| 51 | unset( $options['CHANGELOG.md'] ); |
|
| @@ 48-51 (lines=4) @@ | ||
| 45 | * @param string|null $expectChangelog Expected changelog file contents, or null if it should be the same as $options['changelog']. |
|
| 46 | */ |
|
| 47 | public function testExecute( array $args, array $options, array $inputs, $expectExitCode, $expectOutputRegexes = array(), $expectChangesDeleted = false, $expectChangelog = null ) { |
|
| 48 | if ( isset( $options['composer.json'] ) ) { |
|
| 49 | file_put_contents( 'composer.json', json_encode( array( 'extra' => array( 'changelogger' => $options['composer.json'] ) ), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ) ); |
|
| 50 | unset( $options['composer.json'] ); |
|
| 51 | } |
|
| 52 | $changelog = isset( $options['changelog'] ) ? $options['changelog'] : null; |
|
| 53 | $changes = isset( $options['changes'] ) ? $options['changes'] : array(); |
|
| 54 | unset( $options['changelog'], $options['changes'] ); |
|