Code Duplication    Length = 9-10 lines in 2 locations

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

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