Code Duplication    Length = 15-15 lines in 2 locations

tests/phpunit/tests/functions.php 2 locations

@@ 252-266 (lines=15) @@
249
			admin_url( 'edit.php#frag', 'https' ),
250
		);
251
252
		foreach ( $urls as $url ) {
253
			$_SERVER['REQUEST_URI'] = 'nothing';
254
255
			$this->assertEquals( "$url?foo=1", add_query_arg( 'foo', '1', $url ) );
256
			$this->assertEquals( "$url?foo=1", add_query_arg( array( 'foo' => '1' ), $url ) );
257
			$this->assertEquals( "$url?foo=2", add_query_arg( array( 'foo' => '1', 'foo' => '2' ), $url ) );
258
			$this->assertEquals( "$url?foo=1&bar=2", add_query_arg( array( 'foo' => '1', 'bar' => '2' ), $url ) );
259
260
			$_SERVER['REQUEST_URI'] = $url;
261
262
			$this->assertEquals( "$url?foo=1", add_query_arg( 'foo', '1' ) );
263
			$this->assertEquals( "$url?foo=1", add_query_arg( array( 'foo' => '1' ) ) );
264
			$this->assertEquals( "$url?foo=2", add_query_arg( array( 'foo' => '1', 'foo' => '2' ) ) );
265
			$this->assertEquals( "$url?foo=1&bar=2", add_query_arg( array( 'foo' => '1', 'bar' => '2' ) ) );
266
		}
267
268
		foreach ( $frag_urls as $frag_url ) {
269
			$_SERVER['REQUEST_URI'] = 'nothing';
@@ 297-311 (lines=15) @@
294
			admin_url( 'edit.php?baz=0&za=0' ),
295
		);
296
297
		foreach ( $qs_urls as $url ) {
298
			$_SERVER['REQUEST_URI'] = 'nothing';
299
300
			$this->assertEquals( "$url&foo=1", add_query_arg( 'foo', '1', $url ) );
301
			$this->assertEquals( "$url&foo=1", add_query_arg( array( 'foo' => '1' ), $url ) );
302
			$this->assertEquals( "$url&foo=2", add_query_arg( array( 'foo' => '1', 'foo' => '2' ), $url ) );
303
			$this->assertEquals( "$url&foo=1&bar=2", add_query_arg( array( 'foo' => '1', 'bar' => '2' ), $url ) );
304
305
			$_SERVER['REQUEST_URI'] = $url;
306
307
			$this->assertEquals( "$url&foo=1", add_query_arg( 'foo', '1' ) );
308
			$this->assertEquals( "$url&foo=1", add_query_arg( array( 'foo' => '1' ) ) );
309
			$this->assertEquals( "$url&foo=2", add_query_arg( array( 'foo' => '1', 'foo' => '2' ) ) );
310
			$this->assertEquals( "$url&foo=1&bar=2", add_query_arg( array( 'foo' => '1', 'bar' => '2' ) ) );
311
		}
312
313
		$_SERVER['REQUEST_URI'] = $old_req_uri;
314
	}