Skip to content

Commit c87f064

Browse files
committed
Test multiple post types
1 parent d99f6ee commit c87f064

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/RandomPostOnRefreshTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,14 @@ public function test_build_query_args_defaults() {
7474
* Test build_query_args with minimal attributes.
7575
*/
7676
public function test_build_query_args_minimal() {
77-
$atts = array(
78-
'post_type' => 'post',
77+
$atts = array_merge(
78+
RandomPostOnRefresh::DEFAULT_ATTRIBUTES,
79+
array(
80+
'post_type' => 'post,page',
81+
)
7982
);
8083
$args = RandomPostOnRefresh::build_query_args( $atts );
81-
$this->assertEquals( array( 'post' ), $args['post_type'] );
84+
$this->assertEquals( array( 'post', 'page' ), $args['post_type'] );
8285
$this->assertEquals( 100, $args['posts_per_page'] );
8386
$this->assertArrayHasKey( 'post__not_in', $args );
8487
}

0 commit comments

Comments
 (0)