diff --git a/tests/phpunit/tests/media.php b/tests/phpunit/tests/media.php
index 5d92d9718b..6154091b72 100644
--- a/tests/phpunit/tests/media.php
+++ b/tests/phpunit/tests/media.php
@@ -2016,35 +2016,36 @@ EOF;
 	/**
 	 * @ticket 36549
 	 * @ticket 33641
+	 * @ticket 55274
 	 */
-	public function test_wp_calculate_image_srcset_with_spaces_in_filenames() {
+	public function test_wp_calculate_image_srcset_with_special_chars_in_filenames() {
 		// Mock data for this test.
-		$image_src  = 'http://' . WP_TESTS_DOMAIN . '/wp-content/uploads/2015/12/test image-300x150.png';
+		$image_src  = 'http://' . WP_TESTS_DOMAIN . '/wp-content/uploads/2015/12/test &!image-300x150.png';
 		$image_meta = array(
 			'width'  => 3000,
 			'height' => 1500,
 			'file'   => '2015/12/test image.png',
 			'sizes'  => array(
 				'thumbnail'    => array(
-					'file'      => 'test image-150x150.png',
+					'file'      => 'test &!image-150x150.png',
 					'width'     => 150,
 					'height'    => 150,
 					'mime-type' => 'image/png',
 				),
 				'medium'       => array(
-					'file'      => 'test image-300x150.png',
+					'file'      => 'test &!image-300x150.png',
 					'width'     => 300,
 					'height'    => 150,
 					'mime-type' => 'image/png',
 				),
 				'medium_large' => array(
-					'file'      => 'test image-768x384.png',
+					'file'      => 'test &!image-768x384.png',
 					'width'     => 768,
 					'height'    => 384,
 					'mime-type' => 'image/png',
 				),
 				'large'        => array(
-					'file'      => 'test image-1024x512.png',
+					'file'      => 'test &!image-1024x512.png',
 					'width'     => 1024,
 					'height'    => 512,
 					'mime-type' => 'image/png',
@@ -2054,9 +2055,9 @@ EOF;
 
 		$uploads_url = 'http://' . WP_TESTS_DOMAIN . '/wp-content/uploads/2015/12/';
 
-		$expected_srcset = $uploads_url . 'test%20image-300x150.png 300w, ' .
-			$uploads_url . 'test%20image-768x384.png 768w, ' .
-			$uploads_url . 'test%20image-1024x512.png 1024w';
+		$expected_srcset = $uploads_url . 'test%20%24%21image-300x150.png 300w, ' .
+			$uploads_url . 'test%20%24%21image-768x384.png 768w, ' .
+			$uploads_url . 'test%20%24%21image-1024x512.png 1024w';
 
 		$this->assertSame( $expected_srcset, wp_calculate_image_srcset( array( 300, 150 ), $image_src, $image_meta ) );
 	}
