Make WordPress Core


Ignore:
Timestamp:
11/08/2014 09:07:05 PM (10 years ago)
Author:
jeremyfelt
Message:

Move tests for ms_files_rewriting to separate group, ms-files

When the ms_files_rewriting flag is enabled, ms_upload_constants() is required to properly set upload directory constants. Once this fires, it is impossible to clean up for a non ms_files_rewriting test by turning the option back off.

Excluding these tests by default offer a more consistent environment overall. Any tests written for uploaded files in multisite should ideally have a correspondign test in this area.

This commit also moves existing ms_files_rewriting tests for test_switch_upload_dir().

Fixes #30256

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/bootstrap.php

    r30277 r30286  
    130130
    131131        $ajax_message = true;
     132        $ms_files_message = true;
    132133        foreach ( $options as $option ) {
    133134            switch ( $option[0] ) {
    134135                case '--exclude-group' :
    135136                    $ajax_message = false;
     137                    $ms_files_message = false;
    136138                    continue 2;
    137139                case '--group' :
     
    143145                    }
    144146                    $ajax_message = ! in_array( 'ajax', $groups );
     147                    $ms_files_message = ! in_array( 'ms-files', $groups );
    145148                    continue 2;
    146149            }
     
    149152            echo "Not running ajax tests... To execute these, use --group ajax." . PHP_EOL;
    150153        }
     154        if ( $ms_files_message ) {
     155            echo "Not running ms_files_rewriting tests... To execute these, use --group ms-files." . PHP_EOL;
     156        }
    151157    }
    152158}
Note: See TracChangeset for help on using the changeset viewer.