Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WP Plugins
View All Posts Pages
Commits
ae5a6ee8
Commit
ae5a6ee8
authored
Sep 27, 2020
by
Erick Hitter
Browse files
Fix syntax for 5.3
parent
119cc126
Pipeline
#2912
failed with stages
in 2 minutes and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/test-post-filters.php
View file @
ae5a6ee8
...
...
@@ -41,12 +41,12 @@ class PostFilters extends WP_UnitTestCase {
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
),
]
)
);
}
...
...
@@ -55,9 +55,9 @@ class PostFilters extends WP_UnitTestCase {
*/
public
function
test_view_page_1
():
void
{
query_posts
(
[
array
(
'p'
=>
static
::
$post_id
,
]
)
);
$this
->
assertTrue
(
have_posts
()
);
...
...
@@ -74,10 +74,10 @@ class PostFilters extends WP_UnitTestCase {
*/
public
function
test_view_page_2
():
void
{
query_posts
(
[
array
(
'p'
=>
static
::
$post_id
,
'page'
=>
2
,
]
)
);
$this
->
assertTrue
(
have_posts
()
);
...
...
@@ -94,10 +94,10 @@ class PostFilters extends WP_UnitTestCase {
*/
public
function
test_view_page_3
():
void
{
query_posts
(
[
array
(
'p'
=>
static
::
$post_id
,
'page'
=>
3
,
]
)
);
$this
->
assertTrue
(
have_posts
()
);
...
...
@@ -114,10 +114,10 @@ class PostFilters extends WP_UnitTestCase {
*/
public
function
test_view_all
():
void
{
query_posts
(
[
array
(
'p'
=>
static
::
$post_id
,
'view-all'
=>
true
,
]
)
);
$this
->
assertTrue
(
have_posts
()
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment