Make WordPress Core


Ignore:
Timestamp:
05/01/2017 08:34:10 PM (9 years ago)
Author:
johnbillion
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/general/template.php

    r40543 r40564  
    7676         */
    7777        function test_has_site_icon_returns_true_when_called_for_other_site_with_site_icon_set() {
    78                 $this->skipWithoutMultisite();
    79 
    8078                $blog_id = $this->factory->blog->create();
    8179                switch_to_blog( $blog_id );
     
    9290         */
    9391        function test_has_site_icon_returns_false_when_called_for_other_site_without_site_icon_set() {
    94                 $this->skipWithoutMultisite();
    95 
    9692                $blog_id = $this->factory->blog->create();
    9793
     
    266262         */
    267263        function test_has_custom_logo_returns_true_when_called_for_other_site_with_custom_logo_set() {
    268                 $this->skipWithoutMultisite();
    269 
    270264                $blog_id = $this->factory->blog->create();
    271265                switch_to_blog( $blog_id );
     
    282276         */
    283277        function test_has_custom_logo_returns_false_when_called_for_other_site_without_custom_logo_set() {
    284                 $this->skipWithoutMultisite();
    285 
    286278                $blog_id = $this->factory->blog->create();
    287279
     
    312304         */
    313305        function test_get_custom_logo_returns_logo_when_called_for_other_site_with_custom_logo_set() {
    314                 $this->skipWithoutMultisite();
    315 
    316306                $blog_id = $this->factory->blog->create();
    317307                switch_to_blog( $blog_id );
     
    533523         */
    534524        function test_get_site_icon_url_preserves_switched_state() {
    535                 $this->skipWithoutMultisite();
    536 
    537525                $blog_id = $this->factory->blog->create();
    538526                switch_to_blog( $blog_id );
     
    554542         */
    555543        function test_has_custom_logo_preserves_switched_state() {
    556                 $this->skipWithoutMultisite();
    557 
    558544                $blog_id = $this->factory->blog->create();
    559545                switch_to_blog( $blog_id );
     
    575561         */
    576562        function test_get_custom_logo_preserves_switched_state() {
    577                 $this->skipWithoutMultisite();
    578 
    579563                $blog_id = $this->factory->blog->create();
    580564                switch_to_blog( $blog_id );
Note: See TracChangeset for help on using the changeset viewer.