@@ -868,8 +868,8 @@ public function test_get_comments_pagination_headers( $method ) {
868868 $ request = new WP_REST_Request ( $ method , '/wp/v2/comments ' );
869869 $ response = rest_get_server ()->dispatch ( $ request );
870870 $ headers = $ response ->get_headers ();
871- $ this ->assertSame ( $ total_comments , $ headers ['X-WP-Total ' ] );
872- $ this ->assertSame ( $ total_pages , $ headers ['X-WP-TotalPages ' ] );
871+ $ this ->assertSame ( ( string ) $ total_comments , $ headers ['X-WP-Total ' ] );
872+ $ this ->assertSame ( ( string ) $ total_pages , $ headers ['X-WP-TotalPages ' ] );
873873 $ next_link = add_query_arg (
874874 array (
875875 'page ' => 2 ,
@@ -891,8 +891,8 @@ public function test_get_comments_pagination_headers( $method ) {
891891 $ request ->set_param ( 'page ' , 3 );
892892 $ response = rest_get_server ()->dispatch ( $ request );
893893 $ headers = $ response ->get_headers ();
894- $ this ->assertSame ( $ total_comments , $ headers ['X-WP-Total ' ] );
895- $ this ->assertSame ( $ total_pages , $ headers ['X-WP-TotalPages ' ] );
894+ $ this ->assertSame ( ( string ) $ total_comments , $ headers ['X-WP-Total ' ] );
895+ $ this ->assertSame ( ( string ) $ total_pages , $ headers ['X-WP-TotalPages ' ] );
896896 $ prev_link = add_query_arg (
897897 array (
898898 'page ' => 2 ,
@@ -913,8 +913,8 @@ public function test_get_comments_pagination_headers( $method ) {
913913 $ request ->set_param ( 'page ' , $ total_pages );
914914 $ response = rest_get_server ()->dispatch ( $ request );
915915 $ headers = $ response ->get_headers ();
916- $ this ->assertSame ( $ total_comments , $ headers ['X-WP-Total ' ] );
917- $ this ->assertSame ( $ total_pages , $ headers ['X-WP-TotalPages ' ] );
916+ $ this ->assertSame ( ( string ) $ total_comments , $ headers ['X-WP-Total ' ] );
917+ $ this ->assertSame ( ( string ) $ total_pages , $ headers ['X-WP-TotalPages ' ] );
918918 $ prev_link = add_query_arg (
919919 array (
920920 'page ' => $ total_pages - 1 ,
@@ -929,8 +929,8 @@ public function test_get_comments_pagination_headers( $method ) {
929929 $ request ->set_param ( 'page ' , 100 );
930930 $ response = rest_get_server ()->dispatch ( $ request );
931931 $ headers = $ response ->get_headers ();
932- $ this ->assertSame ( $ total_comments , $ headers ['X-WP-Total ' ] );
933- $ this ->assertEquals ( $ total_pages , $ headers ['X-WP-TotalPages ' ] );
932+ $ this ->assertSame ( ( string ) $ total_comments , $ headers ['X-WP-Total ' ] );
933+ $ this ->assertEquals ( ( string ) $ total_pages , $ headers ['X-WP-TotalPages ' ] );
934934 $ prev_link = add_query_arg (
935935 array (
936936 'page ' => $ total_pages ,
0 commit comments