- Timestamp:
- 07/19/2021 02:00:11 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-tags-controller.php
r51461 r51462 592 592 ); 593 593 $this->assertStringNotContainsString( 'rel="prev"', $headers['Link'] ); 594 $this->assert Contains( '<' . $next_link . '>; rel="next"', $headers['Link'] );594 $this->assertStringContainsString( '<' . $next_link . '>; rel="next"', $headers['Link'] ); 595 595 596 596 // 3rd page. … … 610 610 rest_url( 'wp/v2/tags' ) 611 611 ); 612 $this->assert Contains( '<' . $prev_link . '>; rel="prev"', $headers['Link'] );612 $this->assertStringContainsString( '<' . $prev_link . '>; rel="prev"', $headers['Link'] ); 613 613 $next_link = add_query_arg( 614 614 array( … … 617 617 rest_url( 'wp/v2/tags' ) 618 618 ); 619 $this->assert Contains( '<' . $next_link . '>; rel="next"', $headers['Link'] );619 $this->assertStringContainsString( '<' . $next_link . '>; rel="next"', $headers['Link'] ); 620 620 621 621 // Last page. … … 632 632 rest_url( 'wp/v2/tags' ) 633 633 ); 634 $this->assert Contains( '<' . $prev_link . '>; rel="prev"', $headers['Link'] );634 $this->assertStringContainsString( '<' . $prev_link . '>; rel="prev"', $headers['Link'] ); 635 635 $this->assertStringNotContainsString( 'rel="next"', $headers['Link'] ); 636 636 … … 648 648 rest_url( 'wp/v2/tags' ) 649 649 ); 650 $this->assert Contains( '<' . $prev_link . '>; rel="prev"', $headers['Link'] );650 $this->assertStringContainsString( '<' . $prev_link . '>; rel="prev"', $headers['Link'] ); 651 651 $this->assertStringNotContainsString( 'rel="next"', $headers['Link'] ); 652 652 } … … 760 760 $headers = $response->get_headers(); 761 761 $data = $response->get_data(); 762 $this->assert Contains( '/wp/v2/tags/' . $data['id'], $headers['Location'] );762 $this->assertStringContainsString( '/wp/v2/tags/' . $data['id'], $headers['Location'] ); 763 763 $this->assertSame( 'My Awesome Term', $data['name'] ); 764 764 $this->assertSame( 'This term is so awesome.', $data['description'] ); … … 777 777 $headers = $response->get_headers(); 778 778 $data = $response->get_data(); 779 $this->assert Contains( '/wp/v2/tags/' . $data['id'], $headers['Location'] );779 $this->assertStringContainsString( '/wp/v2/tags/' . $data['id'], $headers['Location'] ); 780 780 $this->assertSame( 'My Awesome Term', $data['name'] ); 781 781 $this->assertSame( 'This term is so awesome.', $data['description'] ); … … 820 820 $headers = $response->get_headers(); 821 821 $data = $response->get_data(); 822 $this->assert Contains( '/wp/v2/tags/' . $data['id'], $headers['Location'] );822 $this->assertStringContainsString( '/wp/v2/tags/' . $data['id'], $headers['Location'] ); 823 823 $this->assertSame( 'My Awesome Term', $data['name'] ); 824 824 $this->assertSame( 'hello', get_term_meta( $data['id'], 'test_tag_single', true ) ); … … 838 838 $headers = $response->get_headers(); 839 839 $data = $response->get_data(); 840 $this->assert Contains( '/wp/v2/tags/' . $data['id'], $headers['Location'] );840 $this->assertStringContainsString( '/wp/v2/tags/' . $data['id'], $headers['Location'] ); 841 841 $this->assertSame( 'My Awesome Term', $data['name'] ); 842 842 $this->assertSame( '', get_term_meta( $existing_tag_id, 'test_tag_single', true ) ); … … 1440 1440 } 1441 1441 $this->assertSameSets( $expected_links, array_keys( $links ) ); 1442 $this->assert Contains( 'wp/v2/taxonomies/' . $term->taxonomy, $links['about'][0]['href'] );1442 $this->assertStringContainsString( 'wp/v2/taxonomies/' . $term->taxonomy, $links['about'][0]['href'] ); 1443 1443 $this->assertSame( add_query_arg( 'tags', $term->term_id, rest_url( 'wp/v2/posts' ) ), $links['https://api.w.org/post_type'][0]['href'] ); 1444 1444 }
Note: See TracChangeset
for help on using the changeset viewer.