Code Duplication    Length = 9-10 lines in 2 locations

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

@@ 113-121 (lines=9) @@
110
	/**
111
	 * Test doRun(), command threw ConfigException.
112
	 */
113
	public function testDoRun_ConfigException() {
114
		$tester = $this->runApplication(
115
			function () {
116
				throw new ConfigException( 'Test config exception' );
117
			}
118
		);
119
		$this->assertSame( -1, $tester->getStatusCode() );
120
		$this->assertSame( "Test config exception\n", $tester->getDisplay() );
121
	}
122
123
	/**
124
	 * Test doRun(), command threw RuntimeException.
@@ 126-135 (lines=10) @@
123
	/**
124
	 * Test doRun(), command threw RuntimeException.
125
	 */
126
	public function testDoRun_RuntimeException() {
127
		$tester = $this->runApplication(
128
			function () {
129
				throw new RuntimeException( 'Test runtime exception' );
130
			},
131
			array( 'catch-exceptions' => true )
132
		);
133
		$this->assertSame( 1, $tester->getStatusCode() );
134
		$this->assertMatchesRegularExpression( '/In ApplicationTest.php line \d+:\n *\n  Test runtime exception *\n/', $tester->getDisplay() );
135
	}
136
137
	/**
138
	 * Test of doRun() with COMPOSER set