mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-31 22:20:29 +00:00
Build/Test Tools: Automatically skip tests in the ms-required and ms-excluded groups.
This removes the need to manually call `$this->skipWithMultisite()` and `$this->skipWithoutMultisite()` from within the test when the test only runs without Multisite or only runs on Multisite, respectively. Props jdgrimes for the suggestion. Fixes #40531 git-svn-id: https://develop.svn.wordpress.org/trunk@40564 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -148,8 +148,6 @@ class Tests_Theme_WPTheme extends WP_UnitTestCase {
|
||||
* @group ms-required
|
||||
*/
|
||||
function test_wp_theme_network_enable_single_theme() {
|
||||
$this->skipWithoutMultisite();
|
||||
|
||||
$theme = 'testtheme-1';
|
||||
$current_allowed_themes = get_site_option( 'allowedthemes' );
|
||||
WP_Theme::network_enable_theme( $theme );
|
||||
@@ -167,8 +165,6 @@ class Tests_Theme_WPTheme extends WP_UnitTestCase {
|
||||
* @group ms-required
|
||||
*/
|
||||
function test_wp_theme_network_enable_multiple_themes() {
|
||||
$this->skipWithoutMultisite();
|
||||
|
||||
$themes = array( 'testtheme-2', 'testtheme-3' );
|
||||
$current_allowed_themes = get_site_option( 'allowedthemes' );
|
||||
WP_Theme::network_enable_theme( $themes );
|
||||
@@ -186,8 +182,6 @@ class Tests_Theme_WPTheme extends WP_UnitTestCase {
|
||||
* @group ms-required
|
||||
*/
|
||||
function test_network_disable_single_theme() {
|
||||
$this->skipWithoutMultisite();
|
||||
|
||||
$current_allowed_themes = get_site_option( 'allowedthemes' );
|
||||
|
||||
$allowed_themes = array( 'existing-1' => true, 'existing-2' => true, 'existing-3' => true );
|
||||
@@ -209,8 +203,6 @@ class Tests_Theme_WPTheme extends WP_UnitTestCase {
|
||||
* @group ms-required
|
||||
*/
|
||||
function test_network_disable_multiple_themes() {
|
||||
$this->skipWithoutMultisite();
|
||||
|
||||
$current_allowed_themes = get_site_option( 'allowedthemes' );
|
||||
|
||||
$allowed_themes = array( 'existing-4' => true, 'existing-5' => true, 'existing-6' => true );
|
||||
|
||||
Reference in New Issue
Block a user