mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
Build/Test Tools: Introduce skipWithoutMultisite() and skipWithMultisite() methods into the test suite.
This brings much needed uniformity to test skipping when a test requires Multisite or when a test should be excluded from running when Multisite is enabled. Used in conjunction with the `@group ms-required` and `@group ms-excluded` notation, this removes a significant number of skipped tests from the default test suite run. Fixes #40531 git-svn-id: https://develop.svn.wordpress.org/trunk@40543 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -938,14 +938,12 @@ class Tests_Functions extends WP_UnitTestCase {
|
||||
* @group ms-excluded
|
||||
*/
|
||||
function test_wp_check_filetype_and_ext_with_filtered_svg() {
|
||||
$this->skipWithMultisite();
|
||||
|
||||
if ( ! extension_loaded( 'fileinfo' ) ) {
|
||||
$this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' );
|
||||
}
|
||||
|
||||
if ( is_multisite() ) {
|
||||
$this->markTestSkipped( 'Test does not run in multisite' );
|
||||
}
|
||||
|
||||
$file = DIR_TESTDATA . '/uploads/video-play.svg';
|
||||
$filename = 'video-play.svg';
|
||||
|
||||
@@ -964,16 +962,15 @@ class Tests_Functions extends WP_UnitTestCase {
|
||||
|
||||
/**
|
||||
* @ticket 39550
|
||||
* @group ms-excluded
|
||||
*/
|
||||
function test_wp_check_filetype_and_ext_with_filtered_woff() {
|
||||
$this->skipWithMultisite();
|
||||
|
||||
if ( ! extension_loaded( 'fileinfo' ) ) {
|
||||
$this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' );
|
||||
}
|
||||
|
||||
if ( is_multisite() ) {
|
||||
$this->markTestSkipped( 'Test does not run in multisite' );
|
||||
}
|
||||
|
||||
$file = DIR_TESTDATA . '/uploads/dashicons.woff';
|
||||
$filename = 'dashicons.woff';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user