Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Commit

Permalink
Add unit-test for snapshot_merge_print_script
Browse files Browse the repository at this point in the history
  • Loading branch information
PatelUtkarsh committed Oct 7, 2016
1 parent 3a1c5d5 commit 37e3b7b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/php/test-class-post-type.php
Expand Up @@ -828,7 +828,17 @@ public function test_handle_snapshot_bulk_actions() {
* @see Post_Type::snapshot_merge_print_script()
*/
public function test_snapshot_merge_print_script() {
$this->markTestIncomplete();
global $post_type;
$post_type = Post_Type::SLUG; // WPCS: global override ok.
$post_type_obj = new Post_Type( $this->plugin->customize_snapshot_manager );
ob_start();
$post_type_obj->snapshot_merge_print_script();
$metabox_content = ob_get_clean();

$this->assertContains( 'select[name="action"]', $metabox_content );
$this->assertContains( 'select[name="action2"]', $metabox_content );
$this->assertContains( 'merge_snapshot', $metabox_content );
$this->assertContains( 'text/javascript', $metabox_content );
}

/**
Expand Down

0 comments on commit 37e3b7b

Please sign in to comment.