@@ 411-418 (lines=8) @@ | ||
408 | /** |
|
409 | * Test the formatterPlugin method error case. |
|
410 | */ |
|
411 | public function testFormatterPlugin_error() { |
|
412 | $this->resetConfigCache(); |
|
413 | $this->writeComposerJson( array( 'formatter' => array( 'class' => 'foobar' ) ) ); |
|
414 | ||
415 | $this->expectException( \RuntimeException::class ); |
|
416 | $this->expectExceptionMessage( "Unknown formatter plugin {\n \"class\": \"foobar\"\n}" ); |
|
417 | Config::formatterPlugin(); |
|
418 | } |
|
419 | ||
420 | /** |
|
421 | * Test the versioningPlugin method. |
|
@@ 435-442 (lines=8) @@ | ||
432 | /** |
|
433 | * Test the versioningPlugin method error case. |
|
434 | */ |
|
435 | public function testVersioningPlugin_error() { |
|
436 | $this->resetConfigCache(); |
|
437 | $this->writeComposerJson( array( 'versioning' => array( 'class' => 'foobar' ) ) ); |
|
438 | ||
439 | $this->expectException( \RuntimeException::class ); |
|
440 | $this->expectExceptionMessage( "Unknown versioning plugin {\n \"class\": \"foobar\"\n}" ); |
|
441 | Config::versioningPlugin(); |
|
442 | } |
|
443 | ||
444 | } |
|
445 |