Skip to content
Snippets Groups Projects

Bump WP compatibility

Merged Erick Hitter requested to merge bump-wp-compat into master
+ 15
15
@@ -37,27 +37,27 @@ class PostFilters extends WP_UnitTestCase {
/**
* Prepare data for tests.
*/
public function setUp(): void {
public function setUp() {
parent::setUp();
static::$post_id = $this->factory->post->create(
[
array(
'post_title' => 'Pagination Test',
'post_status' => 'publish',
'post_date' => '2019-01-01 00:01:01',
'post_content' => implode( static::$page_break, static::$pages_content ),
]
)
);
}
/**
* Test retrieving page 1 content.
*/
public function test_view_page_1(): void {
public function test_view_page_1() {
query_posts(
[
array(
'p' => static::$post_id,
]
)
);
$this->assertTrue( have_posts() );
@@ -72,12 +72,12 @@ class PostFilters extends WP_UnitTestCase {
/**
* Test retrieving page 2 content.
*/
public function test_view_page_2(): void {
public function test_view_page_2() {
query_posts(
[
array(
'p' => static::$post_id,
'page' => 2,
]
)
);
$this->assertTrue( have_posts() );
@@ -92,12 +92,12 @@ class PostFilters extends WP_UnitTestCase {
/**
* Test retrieving page 3 content.
*/
public function test_view_page_3(): void {
public function test_view_page_3() {
query_posts(
[
array(
'p' => static::$post_id,
'page' => 3,
]
)
);
$this->assertTrue( have_posts() );
@@ -112,12 +112,12 @@ class PostFilters extends WP_UnitTestCase {
/**
* Test retrieving "view all" contents.
*/
public function test_view_all(): void {
public function test_view_all() {
query_posts(
[
array(
'p' => static::$post_id,
'view-all' => true,
]
)
);
$this->assertTrue( have_posts() );
Loading