We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d99f6ee commit c87f064Copy full SHA for c87f064
tests/RandomPostOnRefreshTest.php
@@ -74,11 +74,14 @@ public function test_build_query_args_defaults() {
74
* Test build_query_args with minimal attributes.
75
*/
76
public function test_build_query_args_minimal() {
77
- $atts = array(
78
- 'post_type' => 'post',
+ $atts = array_merge(
+ RandomPostOnRefresh::DEFAULT_ATTRIBUTES,
79
+ array(
80
+ 'post_type' => 'post,page',
81
+ )
82
);
83
$args = RandomPostOnRefresh::build_query_args( $atts );
- $this->assertEquals( array( 'post' ), $args['post_type'] );
84
+ $this->assertEquals( array( 'post', 'page' ), $args['post_type'] );
85
$this->assertEquals( 100, $args['posts_per_page'] );
86
$this->assertArrayHasKey( 'post__not_in', $args );
87
}
0 commit comments