Code Duplication    Length = 9-9 lines in 2 locations

packages/status/tests/php/test_Status.php 1 location

@@ 177-185 (lines=9) @@
174
	 * @param mixed  $return_value  Return value of the function.
175
	 * @return phpmock\Mock The mock object.
176
	 */
177
	protected function mock_function( $function_name, $return_value = null ) {
178
		$builder = new MockBuilder();
179
		$builder->setNamespace( __NAMESPACE__ )
180
			->setName( $function_name )
181
			->setFunction( function() use ( &$return_value ) {
182
				return $return_value;
183
			} );
184
		return $builder->build()->enable();
185
	}
186
}
187

packages/connection/tests/php/Manager.php 1 location

@@ 124-132 (lines=9) @@
121
	 * @param mixed  $return_value  Return value of the function.
122
	 * @return phpmock\Mock The mock object.
123
	 */
124
	protected function mock_function( $function_name, $return_value = null ) {
125
		$builder = new MockBuilder();
126
		$builder->setNamespace( __NAMESPACE__ )
127
			->setName( $function_name )
128
			->setFunction( function() use ( &$return_value ) {
129
				return $return_value;
130
			} );
131
		return $builder->build()->enable();
132
	}
133
134
	public function test_api_url_defaults() {
135
		$this->assertEquals(