Make WordPress Core

Ticket #54183: 54183-option-3.patch

File 54183-option-3.patch, 10.5 KB (added by costdev, 3 years ago)

Skip risky tests.

  • tests/phpunit/tests/rest-api/rest-autosaves-controller.php

    diff --git a/tests/phpunit/tests/rest-api/rest-autosaves-controller.php b/tests/phpunit/tests/rest-api/rest-autosaves-controller.php
    index cf85a864be..5b3d450f22 100644
    a b class WP_Test_REST_Autosaves_Controller extends WP_Test_REST_Post_Type_Controlle 
    270270        }
    271271
    272272        public function test_delete_item() {
    273                 // Doesn't exist.
     273                $this->markTestSkipped( 'Controller does not implement delete_item().' );
    274274        }
    275275
    276276        public function test_prepare_item() {
  • tests/phpunit/tests/rest-api/rest-block-type-controller.php

    diff --git a/tests/phpunit/tests/rest-api/rest-block-type-controller.php b/tests/phpunit/tests/rest-api/rest-block-type-controller.php
    index a774b9be1f..ebba1941a9 100644
    a b class REST_Block_Type_Controller_Test extends WP_Test_REST_Controller_Testcase { 
    538538        /**
    539539         * The test_create_item() method does not exist for block types.
    540540         */
    541         public function test_create_item() {}
     541        public function test_create_item() {
     542                $this->markTestSkipped( 'Controller does not implement create_item().' );
     543        }
    542544
    543545        /**
    544546         * The test_update_item() method does not exist for block types.
    545547         */
    546         public function test_update_item() {}
     548        public function test_update_item() {
     549                $this->markTestSkipped( 'Controller does not implement update_item().' );
     550        }
    547551
    548552        /**
    549553         * The test_delete_item() method does not exist for block types.
    550554         */
    551         public function test_delete_item() {}
     555        public function test_delete_item() {
     556                $this->markTestSkipped( 'Controller does not implement delete_item().' );
     557        }
    552558}
  • tests/phpunit/tests/rest-api/rest-pages-controller.php

    diff --git a/tests/phpunit/tests/rest-api/rest-pages-controller.php b/tests/phpunit/tests/rest-api/rest-pages-controller.php
    index 00047cce80..95fbb9c145 100644
    a b class WP_Test_REST_Pages_Controller extends WP_Test_REST_Post_Type_Controller_Te 
    409409        }
    410410
    411411        public function test_get_item() {
    412 
     412                $this->markTestSkipped( 'Controller does not implement get_item().' );
    413413        }
    414414
    415415        public function test_get_item_invalid_post_type() {
    class WP_Test_REST_Pages_Controller extends WP_Test_REST_Post_Type_Controller_Te 
    420420        }
    421421
    422422        public function test_create_item() {
    423 
     423                $this->markTestSkipped( 'Controller does not implement create_item().' );
    424424        }
    425425
    426426        public function test_create_item_with_template() {
    class WP_Test_REST_Pages_Controller extends WP_Test_REST_Post_Type_Controller_Te 
    485485        }
    486486
    487487        public function test_update_item() {
    488 
     488                $this->markTestSkipped( 'Controller does not implement update_item().' );
    489489        }
    490490
    491491        public function test_delete_item() {
    class WP_Test_REST_Pages_Controller extends WP_Test_REST_Post_Type_Controller_Te 
    508508        }
    509509
    510510        public function test_prepare_item() {
    511 
     511                $this->markTestSkipped( 'Controller does not implement prepare_item().' );
    512512        }
    513513
    514514        public function test_prepare_item_limit_fields() {
  • tests/phpunit/tests/rest-api/rest-settings-controller.php

    diff --git a/tests/phpunit/tests/rest-api/rest-settings-controller.php b/tests/phpunit/tests/rest-api/rest-settings-controller.php
    index bb9a4bbdb6..475cdacc15 100644
    a b class WP_Test_REST_Settings_Controller extends WP_Test_REST_Controller_Testcase 
    7171        }
    7272
    7373        public function test_context_param() {
     74                $this->markTestSkipped( 'Controller does not implement context_param().' );
    7475        }
    7576
    7677        public function test_get_item_is_not_public_not_authenticated() {
    class WP_Test_REST_Settings_Controller extends WP_Test_REST_Controller_Testcase 
    375376
    376377
    377378        public function test_create_item() {
     379                $this->markTestSkipped( 'Controller does not implement create_item().' );
    378380        }
    379381
    380382        public function test_update_item() {
    class WP_Test_REST_Settings_Controller extends WP_Test_REST_Controller_Testcase 
    655657        }
    656658
    657659        public function test_prepare_item() {
     660                $this->markTestSkipped( 'Controller does not implement prepare_item().' );
    658661        }
    659662
    660663        public function test_get_item_schema() {
     664                $this->markTestSkipped( 'Controller does not implement get_item_schema().' );
    661665        }
    662666
    663667        /**
  • tests/phpunit/tests/rest-api/rest-sidebars-controller.php

    diff --git a/tests/phpunit/tests/rest-api/rest-sidebars-controller.php b/tests/phpunit/tests/rest-api/rest-sidebars-controller.php
    index 850210cc20..6b734c26d4 100644
    a b class WP_Test_REST_Sidebars_Controller extends WP_Test_REST_Controller_Testcase 
    433433         * The test_create_item() method does not exist for sidebar.
    434434         */
    435435        public function test_create_item() {
     436                $this->markTestSkipped( 'Controller does not implement create_item().' );
    436437        }
    437438
    438439        /**
    class WP_Test_REST_Sidebars_Controller extends WP_Test_REST_Controller_Testcase 
    750751         * The test_delete_item() method does not exist for sidebar.
    751752         */
    752753        public function test_delete_item() {
     754                $this->markTestSkipped( 'Controller does not implement delete_item().' );
    753755        }
    754756
    755757        /**
    756758         * The test_prepare_item() method does not exist for sidebar.
    757759         */
    758760        public function test_prepare_item() {
     761                $this->markTestSkipped( 'Controller does not implement prepare_item().' );
    759762        }
    760763
    761764        /**
  • tests/phpunit/tests/rest-api/rest-tags-controller.php

    diff --git a/tests/phpunit/tests/rest-api/rest-tags-controller.php b/tests/phpunit/tests/rest-api/rest-tags-controller.php
    index 6ec4bbb689..95f489731d 100644
    a b class WP_Test_REST_Tags_Controller extends WP_Test_REST_Controller_Testcase { 
    424424                $response = rest_get_server()->dispatch( $request );
    425425                $tags     = $response->get_data();
    426426
    427                 foreach ( $tags as $tag ) {
    428                         $this->assertSame( $tag['name'], "Tag {$i}" );
    429                         $i++;
     427                if ( ! empty( $tags ) ) {
     428                        foreach ( $tags as $tag ) {
     429                                $this->assertSame( $tag['name'], "Tag {$i}" );
     430                                $i++;
     431                        }
     432                } else {
     433                        $this->markTestSkipped( 'No tags found. Test skipped.' );
    430434                }
    431435        }
    432436
  • tests/phpunit/tests/rest-api/rest-templates-controller.php

    diff --git a/tests/phpunit/tests/rest-api/rest-templates-controller.php b/tests/phpunit/tests/rest-api/rest-templates-controller.php
    index 356c868d76..2d5fc93e68 100644
    a b class WP_REST_Template_Controller_Test extends WP_Test_REST_Controller_Testcase 
    5555
    5656        public function test_context_param() {
    5757                // TODO: Implement test_context_param() method.
     58                $this->markTestSkipped( 'Controller does not implement context_param().' );
    5859        }
    5960
    6061        public function test_get_items() {
    class WP_REST_Template_Controller_Test extends WP_Test_REST_Controller_Testcase 
    189190
    190191        public function test_prepare_item() {
    191192                // TODO: Implement test_prepare_item() method.
     193                $this->markTestSkipped( 'Controller does not implement prepare_item().' );
    192194        }
    193195
    194196        public function test_get_item_schema() {
    195197                // TODO: Implement test_get_item_schema() method.
     198                $this->markTestSkipped( 'Controller does not implement get_item_schema().' );
    196199        }
    197200}
  • tests/phpunit/tests/rest-api/rest-themes-controller.php

    diff --git a/tests/phpunit/tests/rest-api/rest-themes-controller.php b/tests/phpunit/tests/rest-api/rest-themes-controller.php
    index 5acbf7d0f9..efec21b371 100644
    a b class WP_Test_REST_Themes_Controller extends WP_Test_REST_Controller_Testcase { 
    11971197        /**
    11981198         * The create_item() method does not exist for themes.
    11991199         */
    1200         public function test_create_item() {}
     1200        public function test_create_item() {
     1201                $this->markTestSkipped( 'Controller does not implement create_item().' );
     1202        }
    12011203
    12021204        /**
    12031205         * The update_item() method does not exist for themes.
    12041206         */
    1205         public function test_update_item() {}
     1207        public function test_update_item() {
     1208                $this->markTestSkipped( 'Controller does not implement update_item().' );
     1209        }
    12061210
    12071211        /**
    12081212         * Test single theme.
    class WP_Test_REST_Themes_Controller extends WP_Test_REST_Controller_Testcase { 
    12841288        /**
    12851289         * The delete_item() method does not exist for themes.
    12861290         */
    1287         public function test_delete_item() {}
     1291        public function test_delete_item() {
     1292                $this->markTestSkipped( 'Controller does not implement delete_item().' );
     1293        }
    12881294
    12891295        /**
    12901296         * Context is not supported for themes.
    12911297         */
    1292         public function test_context_param() {}
     1298        public function test_context_param() {
     1299                $this->markTestSkipped( 'Controller does not implement context_param().' );
     1300        }
    12931301}
  • tests/phpunit/tests/rest-api/rest-widget-types-controller.php

    diff --git a/tests/phpunit/tests/rest-api/rest-widget-types-controller.php b/tests/phpunit/tests/rest-api/rest-widget-types-controller.php
    index fd0b3007ec..4df468a49f 100644
    a b class WP_Test_REST_Widget_Types_Controller extends WP_Test_REST_Controller_Testc 
    517517        /**
    518518         * The test_create_item() method does not exist for widget types.
    519519         */
    520         public function test_create_item() {}
     520        public function test_create_item() {
     521                $this->markTestSkipped( 'Controller does not implement create_item().' );
     522        }
    521523
    522524        /**
    523525         * The test_update_item() method does not exist for widget types.
    524526         */
    525         public function test_update_item() {}
     527        public function test_update_item() {
     528                $this->markTestSkipped( 'Controller does not implement update_item().' );
     529        }
    526530
    527531        /**
    528532         * The test_delete_item() method does not exist for widget types.
    529533         */
    530         public function test_delete_item() {}
     534        public function test_delete_item() {
     535                $this->markTestSkipped( 'Controller does not implement delete_item().' );
     536        }
    531537}
  • tests/phpunit/tests/rest-api/rest-widgets-controller.php

    diff --git a/tests/phpunit/tests/rest-api/rest-widgets-controller.php b/tests/phpunit/tests/rest-api/rest-widgets-controller.php
    index be0d84e430..eb33fa0665 100644
    a b class WP_Test_REST_Widgets_Controller extends WP_Test_REST_Controller_Testcase { 
    217217         * @ticket 41683
    218218         */
    219219        public function test_context_param() {
     220                $this->markTestSkipped( 'Controller does not implement context_param().' );
    220221        }
    221222
    222223        /**
    class WP_Test_REST_Widgets_Controller extends WP_Test_REST_Controller_Testcase { 
    14381439         * The test_prepare_item() method does not exist for sidebar.
    14391440         */
    14401441        public function test_prepare_item() {
     1442                $this->markTestSkipped( 'Controller does not implement prepare_item().' );
    14411443        }
    14421444
    14431445        /**