Make WordPress Core


Ignore:
Timestamp:
11/04/2021 03:22:47 PM (3 years ago)
Author:
hellofromTonya
Message:

Coding Standards: Add visibility to methods in tests/phpunit/tests/.

Adds a public visibility to test fixtures, tests, data providers, and callbacks methods.

Adds a private visibility to helper methods within test classes.

Renames callbacks and helpers that previously started with a _ prefix. Why? For consistency and to leverage using the method visibility. Further naming standardizations is beyond the scope of this commit.

Props costdev, jrf, hellofromTonya.
Fixes #54177.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/formatting/excerptRemoveBlocks.php

    r51623 r52010  
    5151     * @return string Block output.
    5252     */
    53     function render_fake_block() {
     53    public function render_fake_block() {
    5454        return get_the_excerpt( self::$post_id );
    5555    }
     
    6060     * @since 5.2.0
    6161     */
    62     function set_up() {
     62    public function set_up() {
    6363        parent::set_up();
    6464        self::$post_id = $this->factory()->post->create(
     
    8181     * @since 5.2.0
    8282     */
    83     function tear_down() {
     83    public function tear_down() {
    8484        $registry = WP_Block_Type_Registry::get_instance();
    8585        $registry->unregister( 'core/fake' );
     
    9393     * @ticket 46133
    9494     */
    95     function test_excerpt_remove_blocks() {
     95    public function test_excerpt_remove_blocks() {
    9696        // Simple dynamic block..
    9797        $content = '<!-- wp:core/block /-->';
     
    118118     * @ticket 46133
    119119     */
    120     function test_excerpt_infinite_loop() {
     120    public function test_excerpt_infinite_loop() {
    121121        $query = new WP_Query(
    122122            array(
Note: See TracChangeset for help on using the changeset viewer.