From 506474761912b23d317bd1e4bf8c0bed73a40548 Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Tue, 8 Mar 2016 16:44:25 +0000 Subject: [PATCH] Tests: Remove `test_new_files_are_not_in_old_files_array()` from [36843]. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../tests/admin/includesUpdateCore.php | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/tests/phpunit/tests/admin/includesUpdateCore.php b/tests/phpunit/tests/admin/includesUpdateCore.php index 000be20402..82ecfa62fa 100644 --- a/tests/phpunit/tests/admin/includesUpdateCore.php +++ b/tests/phpunit/tests/admin/includesUpdateCore.php @@ -19,30 +19,11 @@ class Tests_Admin_IncludesUpdateCore extends WP_UnitTestCase { 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. * - * 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 * - * @depends test_new_files_are_not_in_old_files_array * @dataProvider data_old_files * * @param string $file File name.