Code Duplication    Length = 4-4 lines in 2 locations

projects/packages/changelogger/tests/php/tests/src/AddCommandTest.php 1 location

@@ 110-113 (lines=4) @@
107
	 * @param string[]    $expectOutputRegexes Regexes to run against the output.
108
	 */
109
	public function testExecute( array $args, array $options, array $inputs, $expectExitCode, $expectFile, $expectOutputRegexes = array() ) {
110
		if ( isset( $options['composer.json'] ) ) {
111
			file_put_contents( 'composer.json', json_encode( $options['composer.json'], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ) );
112
			unset( $options['composer.json'] );
113
		}
114
115
		$tester = $this->getTester( 'add' );
116
		$tester->setInputs( $inputs );

projects/packages/changelogger/tests/php/tests/src/ValidateCommandTest.php 1 location

@@ 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
		$tester = $this->getTester( 'validate' );
60
		$code   = $tester->execute( $args, $options );