File tree 2 files changed +15
-7
lines changed
2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 7
7
convertNoticesToExceptions=" true"
8
8
convertWarningsToExceptions=" true"
9
9
verbose=" true"
10
- syntaxCheck=" true"
11
10
>
12
11
<php >
13
12
<const name =" PHPUNIT_WPJM_TESTSUITE" value =" true" />
Original file line number Diff line number Diff line change @@ -921,14 +921,23 @@ public function test_noindex_expired_filled_job_listings_expired() {
921
921
);
922
922
$ this ->assertEquals ( 1 , $ jobs ->post_count );
923
923
$ this ->assertTrue ( $ jobs ->is_single );
924
- $ desired_result = $ this ->get_wp_no_robots ();
925
924
while ( $ jobs ->have_posts () ) {
926
925
$ jobs ->the_post ();
927
- $ post = get_post ();
928
- ob_start ();
929
- $ instance ->noindex_expired_filled_job_listings ();
930
- $ result = ob_get_clean ();
931
- $ this ->assertEquals ( $ desired_result , $ result );
926
+
927
+ if ( function_exists ('wp_robots ' ) ) {
928
+ $ instance ->noindex_expired_filled_job_listings ();
929
+ ob_start ();
930
+ $ wp_robots = wp_robots ();
931
+ $ result = ob_get_clean ();
932
+ $ this ->assertNotFalse ( strpos ( $ result , 'noindex ' ) );
933
+ } else {
934
+ $ desired_result = $ this ->get_wp_no_robots ();
935
+ $ post = get_post ();
936
+ ob_start ();
937
+ $ instance ->noindex_expired_filled_job_listings ();
938
+ $ result = ob_get_clean ();
939
+ $ this ->assertEquals ( $ desired_result , $ result );
940
+ }
932
941
}
933
942
}
934
943
You can’t perform that action at this time.
0 commit comments