Make WordPress Core

Changeset 36885


Ignore:
Timestamp:
03/08/2016 04:44:25 PM (9 years ago)
Author:
ocean90
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/admin/includesUpdateCore.php

    r36843 r36885  
    2121
    2222    /**
    23      * Ensure no project files are inside `$_old_files`.
     23     * Ensure no project files are inside `$_old_files` in the build directory.
    2424     *
    2525     * @ticket 36083
    2626     *
    27      * @dataProvider data_old_files
    28      *
    29      * @param string $file File name.
    30      */
    31     public function test_new_files_are_not_in_old_files_array( $file ) {
    32         $this->assertFalse( file_exists( ABSPATH . $file ) );
    33         $this->assertFalse( file_exists( ABSPATH . str_replace( '.min.', '.', $file ) ) );
    34         $this->assertFalse( file_exists( ABSPATH . str_replace( '-rtl.min.', '.', $file ) ) );
    35     }
    36 
    37     /**
    38      * Ensure no project files are inside `$_old_files` in the build directory.
    39      *
    40      * The previous test confirms that no existing files are inside `$_old_files`.
    41      * However, we must also confirm that these do not exist in the final build.
    42      *
    43      * @ticket 36083
    44      *
    45      * @depends test_new_files_are_not_in_old_files_array
    4627     * @dataProvider data_old_files
    4728     *
Note: See TracChangeset for help on using the changeset viewer.