Skip to content

Commit 67ad085

Browse files
committed
Ensure the jQuery files exist.
1 parent 324d5a7 commit 67ad085

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

‎tests/phpunit/tests/dependencies/jquery.php‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,31 @@ public function test_location_of_jquery() {
3939
}
4040
}
4141

42+
/**
43+
* Ensure the required jQuery files exist on the file system.
44+
*
45+
* @dataProvider data_jquery_files_exist
46+
*
47+
* @param string $file_name The file name the should exist.
48+
*/
49+
public function test_jquery_files_exist( $file_name ) {
50+
$this->assertFileExists( ABSPATH . "/wp-includes/js/jquery/{$file_name}" );
51+
}
52+
53+
/**
54+
* Data provider for test_jquery_files_exist.
55+
*
56+
* @return array<string, array{ 0: string }>
57+
*/
58+
public function data_jquery_files_exist() {
59+
return array(
60+
'jquery' => array( 'jquery.js' ),
61+
'jquery-min' => array( 'jquery.min.js' ),
62+
'jquery-migrate' => array( 'jquery-migrate.js' ),
63+
'jquery-migrate-min' => array( 'jquery-migrate.min.js' ),
64+
);
65+
}
66+
4267
/**
4368
* @ticket 22896
4469
*

0 commit comments

Comments
 (0)