Skip to content

Commit e4e2a47

Browse files
committed
Remove unused variable, use unabbreviated vars, and add void return type
1 parent d13555b commit e4e2a47

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

tests/phpunit/tests/post/getPosts.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,11 @@ public function test_explicit_offset_non_0_should_override_paged() {
169169
*
170170
* @ticket 64813
171171
*/
172-
public function test_should_accept_query_string_args() {
173-
$p1 = self::factory()->post->create();
174-
$p2 = self::factory()->post->create();
172+
public function test_should_accept_query_string_args(): void {
173+
self::factory()->post->create();
174+
$second_post_id = self::factory()->post->create();
175+
$found_post_ids = get_posts( 'numberposts=1&fields=ids' );
175176

176-
$found = get_posts( 'numberposts=1&fields=ids' );
177-
178-
$this->assertSame( array( $p2 ), $found );
177+
$this->assertSame( array( $second_post_id ), $found_post_ids );
179178
}
180179
}

0 commit comments

Comments
 (0)