Skip to content

Commit

Permalink
test: instantiation with post id
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelpeixe committed Dec 10, 2024
1 parent eb0fa32 commit e0d99d2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/unit-tests/test-incoming-post.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,18 @@ public function test_insert() {
$this->assertSame( [ 'category-1', 'category-2', 'tag-1', 'tag-2' ], wp_list_pluck( $terms, 'slug' ) );
}

/**
* Test instantiation with post ID.
*/
public function test_instantiation_with_post_id() {
$this->incoming_post->insert();

$incoming_post = new Incoming_Post( $this->incoming_post->ID );

$this->assertInstanceOf( Incoming_Post::class, $incoming_post );
$this->assertSame( $this->incoming_post->ID, $incoming_post->ID );
}

/**
* Test insert existing linked post.
*/
Expand Down

0 comments on commit e0d99d2

Please sign in to comment.