diff --git tests/phpunit/tests/functions/getQueryArg.php tests/phpunit/tests/functions/getQueryArg.php
new file mode 100644
index 000000000..6f9a8952f
--- /dev/null
+++ tests/phpunit/tests/functions/getQueryArg.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * @group functions.php
+ */
+class Tests_Functions_GetQueryArg extends WP_UnitTestCase {
+
+	/**
+	 * @ticket 34699
+	 */
+	public function test_get_query_arg() {
+		$this->assertSame( 'value2', get_query_arg( 'param2', '?param=test&param2=value2' ) );
+		$this->assertNotSame( 'value2', get_query_arg( 'param3', '?param=test&param2=value2&param3=value3' ) );
+
+		// When the key is an array
+		$this->assertEquals(
+			array( 'param2' => 'value2', 'param3' => 'value3', 'param4' => null ),
+			get_query_arg( array( 'param2', 'param3', 'param4' ), '?param=test&param2=value2&param3=value3' )
+		);
+
+		// When arg doesn't exists.
+		$this->assertNull( get_query_arg( 'param2', '?param=test' ) );
+
+		// When no query is present.
+		$this->assertSame( array( 'param' => null ), get_query_arg( array( 'param' ), '' ) );
+		$this->assertNull( get_query_arg( 'value', '' ) );
+
+		// Fallback on REQUEST_URI.
+		$this->assertNull( get_query_arg( 'param' ) );
+	}
+
+}
\ No newline at end of file
