Skip to content

Commit

Permalink
Increase coverage by testing the case where we copy the post date
Browse files Browse the repository at this point in the history
  • Loading branch information
enricobattocchi committed Jul 5, 2023
1 parent 8375e48 commit c7b1bcd
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions tests/integration/post-duplicator-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@

namespace Yoast\WP\Duplicate_Post\Tests\Integration;

/**
* Yoast Duplicate Post plugin test file.
*
* @package Yoast\WP\Duplicate_Post\Tests
*/

use Yoast\WPTestUtils\WPIntegration\TestCase;
use Yoast\WP\Duplicate_Post\Post_Duplicator;

Expand Down Expand Up @@ -42,12 +36,13 @@ public function set_up() {
* @covers ::generate_copy_title
* @covers ::generate_copy_status
* @covers ::generate_copy_author
* @covers ::set_modified
*/
public function test_create_duplicate() {

$post = $this->factory->post->create_and_get();

$id = $this->instance->create_duplicate( $post );
$id = $this->instance->create_duplicate( $post, [ 'copy_date' => true ] );

$this->assertTrue( \is_int( $id ) );
}
Expand Down

0 comments on commit c7b1bcd

Please sign in to comment.