diff --git a/tests/phpunit/tests/theme/getAllowedFilters.php b/tests/phpunit/tests/theme/getAllowedFilters.php new file mode 100644 index 0000000000..11a498ae40 --- /dev/null +++ b/tests/phpunit/tests/theme/getAllowedFilters.php @@ -0,0 +1,35 @@ +default_allowed = WP_Theme::get_allowed( $blog_id ); + + add_filter( 'allowed_themes', array( $this, 'filter_allowed_themes' ), 10 ); + $allowed = WP_Theme::get_allowed( $blog_id ); + remove_filter( 'allowed_themes', array( $this, 'filter_allowed_themes' ), 10 ); + + $expected = $this->default_allowed + array( 'allow-on-network' => true ); + + $this->assertEquals( $expected, $allowed ); + } + + public function filter_allowed_themes( $allowed_themes ) { + $allowed_themes['allow-on-network'] = true; + + return $allowed_themes; + } +} \ No newline at end of file