diff --git tests/phpunit/tests/dependencies/scripts.php tests/phpunit/tests/dependencies/scripts.php
index 3f4e724..d334bc7 100644
--- tests/phpunit/tests/dependencies/scripts.php
+++ tests/phpunit/tests/dependencies/scripts.php
@@ -84,4 +84,32 @@ class Tests_Dependencies_Scripts extends WP_UnitTestCase {
 		// Cleanup
 		$wp_scripts->base_url = $base_url_backup;
 	}
+
+	/**
+	 * @ticket 25247
+	 */
+	function test_do_items_with_alias_and_in_footer() {
+		$dep = new WP_Scripts;
+
+		$this->assertTrue( $dep->add( 'one', '', array( 'two', 'three' ) ) );
+		$this->assertTrue( $dep->add( 'two', 'two' ) );
+		$this->assertTrue( $dep->add( 'three', 'three' ) );
+
+		$handles = array( 'one', 'two', 'three' );
+
+		foreach ( $handles as $handle ) {
+			$this->assertTrue( $dep->add_data( $handle, 'group', 1 ) );
+			$this->assertInstanceOf( '_WP_Dependency', $dep->query( $handle ) );
+		}
+
+		$this->assertEmpty( $dep->do_items( $handles, 0 ) );
+
+		$this->assertEmpty( $dep->done );
+
+		$this->assertNotEmpty( $dep->do_items( $handles, 1 ) );
+
+		foreach ( $handles as $handle ) {
+			$this->assertContains( $handle, $dep->done );
+		}
+	}
 }
