Index: tests/phpunit/tests/option/networkOption.php
===================================================================
--- tests/phpunit/tests/option/networkOption.php	(revision 36743)
+++ tests/phpunit/tests/option/networkOption.php	(working copy)
@@ -82,6 +82,86 @@
 			array( 'string', false ),
 		);
 	}
+	
+	/**
+	 * @ticket 35379
+	 */
+	function test_update_network_option_stored_values() {
+	
+		//Switch to main site
+		switch_to_blog( 1 );
+	
+		$id = self::factory()->network->create();
+	
+		/**
+		 * Three default options known to exists in both main site options table and
+		 * And network options table:
+		 * admin_email
+		 * siteurl
+		 * WPLANG
+		 * If wrong values are inputted to these options using update_network_option
+		 * Then the original stored values should remain unchanged and not using the main site option values
+		 *
+		 */
+	
+		$affected_default_options=array(
+				'admin_email' => 	array(
+						'main_site' => 'admin@example.org',
+						'network'   => 'network_admin@example.org',
+						'incorrect' => rand_str()
+				),
+				'siteurl'	 =>		array(
+						'main_site' => 'http://example.org/src/',
+						'network'   => 'http://example.org/',
+						'incorrect' =>  rand_str()
+				),
+				'WPLANG'	 =>		array(
+						'main_site' =>  'en_CA',
+						'network'   =>  'en_US',
+						'incorrect' =>  rand_str()
+				)
+		);
+	
+		$failures = array();
+		foreach ( $affected_default_options as $option_name => $affected_default_option ) {
+	
+			$option_value_main_site = $affected_default_option['main_site'];
+			$option_value_network = $affected_default_option['network'];
+			$incorrect_value_for_testing = $affected_default_option['incorrect'];
+	
+			//Update main site option value
+			update_option( $option_name, $option_value_main_site );
+	
+			//Update network site option value
+			update_network_option( $id , $option_name, $option_value_network );
+	
+			//Check if they are set correctly (debugging purposes)
+			$set_main_site_option_retrieved_correct = get_option( $option_name );
+			$set_network_option_retrieved_correct = get_network_option( $id ,$option_name) ;
+	
+			//Set an invalid value on update_network_option
+			update_network_option( $id , $option_name, $incorrect_value_for_testing );
+	
+			//Retrieve again the value of network admin email
+			$new_network_value_retrieved = get_network_option( $id , $option_name );
+	
+			//Expected value is that the network admin email should be unchanged if submitted admin email is invalid
+			if ( $new_network_value_retrieved != $option_value_network ) {
+				$failures[] = $option_name;
+			}
+	
+		}
+	
+		$count = count( $affected_default_options );
+		$failure_count = count( $failures );
+	
+		$message = '';
+		if ( $failure_count > 0 ) {
+			$comma_separated = implode( ',', $failures );
+			$message = $comma_separated.' fails validation.';
+		}
+		$this->assertEquals( 0, $failure_count , $message );
+	}	
 }
 
 endif;
\ No newline at end of file
