How to create a test that calls is_front_page in phpunit?
The is_front_page() function calls wp_query::is_front_page(). If you scroll down to look at the source, you will see the code you’re looking to trigger: elseif ( ‘page’ == get_option( ‘show_on_front’) && get_option( ‘page_on_front’ ) && $this->is_page( get_option( ‘page_on_front’ ) ) ) return true; To meet that condition, you’ll just need to do this in the code … Read more