Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 321-330 (lines=10) @@
318
	/**
319
	 * Test the formatterPlugin method error case.
320
	 */
321
	public function testFormatterPlugin_error() {
322
		$this->resetConfigCache();
323
		$this->writeComposerJson( array( 'formatter' => array( 'class' => 'foobar' ) ) );
324
		$out = new BufferedOutput();
325
		Config::setOutput( $out );
326
327
		$this->expectException( \RuntimeException::class );
328
		$this->expectExceptionMessage( "Unknown formatter plugin {\n    \"class\": \"foobar\"\n}" );
329
		Config::formatterPlugin();
330
	}
331
332
	/**
333
	 * Test the versioningPlugin method.
@@ 349-358 (lines=10) @@
346
	/**
347
	 * Test the versioningPlugin method error case.
348
	 */
349
	public function testVersioningPlugin_error() {
350
		$this->resetConfigCache();
351
		$this->writeComposerJson( array( 'versioning' => array( 'class' => 'foobar' ) ) );
352
		$out = new BufferedOutput();
353
		Config::setOutput( $out );
354
355
		$this->expectException( \RuntimeException::class );
356
		$this->expectExceptionMessage( "Unknown versioning plugin {\n    \"class\": \"foobar\"\n}" );
357
		Config::versioningPlugin();
358
	}
359
360
}
361