File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
tests/phpunit/tests/query Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change 11<?php
22
3- class pageOnFront extends WP_UnitTestCase {
3+ class Tests_Query_PageForPosts extends WP_UnitTestCase {
44
55 private $ posts_page_id ;
66 public function set_up () {
@@ -13,7 +13,7 @@ public function set_up() {
1313 'post_type ' => 'page ' ,
1414 )
1515 );
16- update_option ('page_for_posts ' , $ this ->posts_page_id );
16+ update_option ( 'page_for_posts ' , $ this ->posts_page_id );
1717 update_option (
1818 'page_on_front ' ,
1919 self ::factory ()->post ->create (
@@ -33,18 +33,22 @@ public function set_up() {
3333 */
3434 public function test_unpublished_posts_page_returns_404 () {
3535
36- wp_update_post ( array (
37- 'ID ' => $ this ->posts_page_id ,
38- 'post_status ' => 'draft ' ,
39- ) );
36+ wp_update_post (
37+ array (
38+ 'ID ' => $ this ->posts_page_id ,
39+ 'post_status ' => 'draft ' ,
40+ )
41+ );
4042
41- $ q = new WP_Query ( array (
42- 'pagename ' => 'blog-page ' ,
43- ) );
43+ $ q = new WP_Query (
44+ array (
45+ 'pagename ' => 'blog-page ' ,
46+ )
47+ );
4448
4549 $ this ->assertTrue (
4650 $ q ->is_404 (),
47- " Unpublished posts page with status should return 404 "
51+ ' Unpublished posts page with status should return 404 '
4852 );
4953 }
5054}
You can’t perform that action at this time.
0 commit comments