Skip to content

Commit e2f5e81

Browse files
Tests: Remove redundant @Covers annotation from export_wp tests and clean up variable assignments
1 parent a451049 commit e2f5e81

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

tests/phpunit/tests/admin/exportWp.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ private function populate_args_post_authors( array &$args, $expected_ids ) {
293293

294294
/**
295295
* @ticket 61244
296-
* @covers ::export_wp
297296
*/
298297
public function test_export_wp_should_not_include_empty_comments_when_filtered() {
299298
$post_id = self::factory()->post->create( array( 'post_title' => 'Test Post' ) );
@@ -307,24 +306,20 @@ static function () {
307306
}
308307
);
309308

310-
$xml_obj = $this->get_the_export( array() );
311-
309+
$xml_obj = $this->get_the_export( array() );
312310
$comment_tags = $xml_obj->xpath( '//wp:comment' );
313-
314311
$this->assertEmpty( $comment_tags, 'No <wp:comment> tags should be present when comments are filtered out.' );
315312
}
316313

317314
/**
318315
* @ticket 61244
319-
* @covers ::export_wp
320316
*/
321317
public function test_export_wp_includes_comments_when_not_filtered() {
322318
$post_id = self::factory()->post->create( array( 'post_title' => 'Test Post' ) );
323319
$comment_count = 3;
324320
self::factory()->comment->create_post_comments( $post_id, $comment_count );
325321

326-
$xml_obj = $this->get_the_export( array() );
327-
322+
$xml_obj = $this->get_the_export( array() );
328323
$comment_tags = $xml_obj->xpath( '//wp:comment' );
329324

330325
$this->assertCount( $comment_count, $comment_tags, 'Export should include all comments when not filtered.' );

0 commit comments

Comments
 (0)