WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.4/tests/phpunit/tests/oembed/discovery.php

    r35436 r36060  
    77    function test_add_oembed_discovery_links_non_singular() {
    88        $this->assertSame( '', get_echo( 'wp_oembed_add_discovery_links' ) );
     9    }
     10
     11    function test_add_oembed_discovery_links_front_page() {
     12        $this->go_to( home_url('/') );
     13        $this->assertSame( '', get_echo( 'wp_oembed_add_discovery_links' ) );
     14    }
     15
     16    function test_add_oembed_discovery_links_static_front_page() {
     17        update_option( 'show_on_front', 'page' );
     18        update_option( 'page_for_posts', self::factory()->post->create( array( 'post_title' => 'blog-page', 'post_type' => 'page' ) ) );
     19        update_option( 'page_on_front', self::factory()->post->create( array( 'post_title' => 'front-page', 'post_type' => 'page' ) ) );
     20
     21        $this->go_to( home_url('/') );
     22        $this->assertSame( '', get_echo( 'wp_oembed_add_discovery_links' ) );
     23
     24        update_option( 'show_on_front', 'posts' );
    925    }
    1026
Note: See TracChangeset for help on using the changeset viewer.