Code Duplication    Length = 16-16 lines in 2 locations

projects/packages/changelogger/tests/php/tests/src/ConfigTest.php 2 locations

@@ 167-182 (lines=16) @@
164
	/**
165
	 * Test the changelogFile method.
166
	 */
167
	public function testChangelogFile() {
168
		$this->resetConfigCache();
169
		$this->assertSame( getcwd() . DIRECTORY_SEPARATOR . 'CHANGELOG.md', Config::changelogFile() );
170
171
		$this->resetConfigCache();
172
		$this->writeComposerJson( array( 'changelog' => 'changes.txt' ) );
173
		$this->assertSame( getcwd() . DIRECTORY_SEPARATOR . 'changes.txt', Config::changelogFile() );
174
175
		$this->resetConfigCache();
176
		$this->writeComposerJson( array( 'changelog' => '/tmp/changes.md' ) );
177
		$this->assertSame( '/tmp/changes.md', Config::changelogFile() );
178
179
		$this->resetConfigCache();
180
		$this->writeComposerJson( array( 'changelog' => 'c:\\changes.md' ) );
181
		$this->assertSame( 'c:\\changes.md', Config::changelogFile() );
182
	}
183
184
	/**
185
	 * Test the changesDir method.
@@ 187-202 (lines=16) @@
184
	/**
185
	 * Test the changesDir method.
186
	 */
187
	public function testChangesDir() {
188
		$this->resetConfigCache();
189
		$this->assertSame( getcwd() . DIRECTORY_SEPARATOR . 'changelog', Config::changesDir() );
190
191
		$this->resetConfigCache();
192
		$this->writeComposerJson( array( 'changes-dir' => 'changes' ) );
193
		$this->assertSame( getcwd() . DIRECTORY_SEPARATOR . 'changes', Config::changesDir() );
194
195
		$this->resetConfigCache();
196
		$this->writeComposerJson( array( 'changes-dir' => '/tmp/changes' ) );
197
		$this->assertSame( '/tmp/changes', Config::changesDir() );
198
199
		$this->resetConfigCache();
200
		$this->writeComposerJson( array( 'changes-dir' => 'c:\\changes' ) );
201
		$this->assertSame( 'c:\\changes', Config::changesDir() );
202
	}
203
204
	/**
205
	 * Test the link method.