Tests: Remove test_new_files_are_not_in_old_files_array()
from [36843].
The test assumes that if a CSS file was added to `$_old_files` all three files (.css, .min.css, -rtl.min.css; it's actually missing the fourth case, -rtl.css) don't exist anymore. But this isn't always the case. The test is also incredible slow because it does three `file_exists()` checks for each file — the global contains 646 files currently. It's important what we have in the /build directory and that's covered by `test_new_files_are_not_in_old_files_array_compiled()`. Fixes #36083. git-svn-id: https://develop.svn.wordpress.org/trunk@36885 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7826b7b205
commit
5064747619
@ -19,30 +19,11 @@ class Tests_Admin_IncludesUpdateCore extends WP_UnitTestCase {
|
|||||||
return $files;
|
return $files;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Ensure no project files are inside `$_old_files`.
|
|
||||||
*
|
|
||||||
* @ticket 36083
|
|
||||||
*
|
|
||||||
* @dataProvider data_old_files
|
|
||||||
*
|
|
||||||
* @param string $file File name.
|
|
||||||
*/
|
|
||||||
public function test_new_files_are_not_in_old_files_array( $file ) {
|
|
||||||
$this->assertFalse( file_exists( ABSPATH . $file ) );
|
|
||||||
$this->assertFalse( file_exists( ABSPATH . str_replace( '.min.', '.', $file ) ) );
|
|
||||||
$this->assertFalse( file_exists( ABSPATH . str_replace( '-rtl.min.', '.', $file ) ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ensure no project files are inside `$_old_files` in the build directory.
|
* Ensure no project files are inside `$_old_files` in the build directory.
|
||||||
*
|
*
|
||||||
* The previous test confirms that no existing files are inside `$_old_files`.
|
|
||||||
* However, we must also confirm that these do not exist in the final build.
|
|
||||||
*
|
|
||||||
* @ticket 36083
|
* @ticket 36083
|
||||||
*
|
*
|
||||||
* @depends test_new_files_are_not_in_old_files_array
|
|
||||||
* @dataProvider data_old_files
|
* @dataProvider data_old_files
|
||||||
*
|
*
|
||||||
* @param string $file File name.
|
* @param string $file File name.
|
||||||
|
Loading…
Reference in New Issue
Block a user