Make WordPress Core

Changeset 65785


Ignore:
Timestamp:
11/25/2026 06:04:19 PM (8 days ago)
Author:
lancewillett
Message:

Themes: Test the empty theme feature registry fallback.

Developed in: ​https://github.com/WordPress/wordpress-develop/pull/16188

Follow-up to r48171.

Props rejaulalomkhan.
Fixes #66824.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/theme.php

    r65729 r65785  
    842842
    843843        /**
     844         * Tests that get_registered_theme_features() falls back to an empty array when the registry is not an array.
     845         *
     846         * @ticket 49406
     847         *
     848         * @covers ::get_registered_theme_features
     849         */
     850        public function test_get_registered_theme_features_fallback() {
     851                global $_wp_registered_theme_features;
     852                $_wp_registered_theme_features = null;
     853
     854                $this->assertSame( array(), get_registered_theme_features() );
     855        }
     856
     857        /**
    844858         * Tests that block themes support a feature by default.
    845859         *
Note: See TracChangeset for help on using the changeset viewer.