WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/01/2017 08:34:10 PM (2 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/rest-api/rest-users-controller.php

    r40543 r40564  
    997997     */
    998998    public function test_create_new_network_user_on_site_does_not_add_user_to_sub_site() {
    999         $this->skipWithoutMultisite();
    1000 
    1001999        $this->allow_user_to_manage_multisite();
    10021000
     
    10271025     */
    10281026    public function test_create_new_network_user_on_sub_site_adds_user_to_site() {
    1029         $this->skipWithoutMultisite();
    1030 
    10311027        $this->allow_user_to_manage_multisite();
    10321028
     
    10611057     */
    10621058    public function test_create_existing_network_user_on_sub_site_has_error() {
    1063         $this->skipWithoutMultisite();
    1064 
    10651059        $this->allow_user_to_manage_multisite();
    10661060
     
    14491443     */
    14501444    public function test_update_user_role_invalid_privilege_deescalation() {
    1451         $this->skipWithMultisite();
    1452 
    14531445        $user_id = $this->factory->user->create( array( 'role' => 'administrator' ) );
    14541446
     
    14801472     */
    14811473    public function test_update_user_role_privilege_deescalation_multisite() {
    1482         $this->skipWithoutMultisite();
    1483 
    14841474        $user_id = $this->factory->user->create( array( 'role' => 'administrator' ) );
    14851475
     
    22292219     */
    22302220    public function test_get_item_from_different_site_as_site_administrator() {
    2231         $this->skipWithoutMultisite();
    2232 
    22332221        switch_to_blog( self::$site );
    22342222        $user_id = $this->factory->user->create( array(
     
    22492237     */
    22502238    public function test_get_item_from_different_site_as_network_administrator() {
    2251         $this->skipWithoutMultisite();
    2252 
    22532239        switch_to_blog( self::$site );
    22542240        $user_id = $this->factory->user->create( array(
     
    22692255     */
    22702256    public function test_update_item_from_different_site_as_site_administrator() {
    2271         $this->skipWithoutMultisite();
    2272 
    22732257        switch_to_blog( self::$site );
    22742258        $user_id = $this->factory->user->create( array(
     
    22912275     */
    22922276    public function test_update_item_from_different_site_as_network_administrator() {
    2293         $this->skipWithoutMultisite();
    2294 
    22952277        switch_to_blog( self::$site );
    22962278        $user_id = $this->factory->user->create( array(
     
    23132295     */
    23142296    public function test_delete_item_from_different_site_as_site_administrator() {
    2315         $this->skipWithoutMultisite();
    2316 
    23172297        switch_to_blog( self::$site );
    23182298        $user_id = $this->factory->user->create( array(
     
    23352315     */
    23362316    public function test_delete_item_from_different_site_as_network_administrator() {
    2337         $this->skipWithoutMultisite();
    2338 
    23392317        switch_to_blog( self::$site );
    23402318        $user_id = $this->factory->user->create( array(
Note: See TracChangeset for help on using the changeset viewer.