CPTP_Module_Rewrite_Test::test_cpt_archive PHP Method

test_cpt_archive() public method

public test_cpt_archive ( )
    public function test_cpt_archive()
    {
        register_post_type($this->post_type, array("public" => true, 'taxonomies' => array('category'), "has_archive" => true));
        do_action('wp_loaded');
        /** @var WP_Rewrite $wp_rewrite */
        global $wp_rewrite;
        $wp_rewrite->flush_rules();
        $this->factory->post->create_many(10, array('post_type' => $this->post_type, "post_date" => "2012-12-12"));
        $this->go_to(get_post_type_archive_link($this->post_type));
        $this->assertQueryTrue("is_archive", "is_post_type_archive");
    }