diff --git a/tests/phpunit/tests/PluginsScreens/PluginsScreens_RemoveUnusedFilterTabsTest.php b/tests/phpunit/tests/PluginsScreens/PluginsScreens_RemoveUnusedFilterTabsTest.php new file mode 100644 index 0000000..7b94ed2 --- /dev/null +++ b/tests/phpunit/tests/PluginsScreens/PluginsScreens_RemoveUnusedFilterTabsTest.php @@ -0,0 +1,43 @@ +setAccessible( true ); + $unsupported = $reflected->getValue( $plugins_screens ); + $reflected->setAccessible( false ); + + $supported = [ + 'tab1' => true, + 'tab2' => true, + 'tab3' => true, + ]; + + $tabs = $supported; + foreach ( $unsupported as $tab ) { + $tabs[ $tab ] = true; + } + + $this->assertSame( + $supported, + $plugins_screens->remove_unused_filter_tabs( $tabs ) + ); + } +}