@@ -440,6 +440,7 @@ public function test_get_terms_pagination_headers() {
440
440
$ headers = $ response ->get_headers ();
441
441
$ this ->assertEquals ( 50 , $ headers ['X-WP-Total ' ] );
442
442
$ this ->assertEquals ( 5 , $ headers ['X-WP-TotalPages ' ] );
443
+ $ this ->assertCount ( 10 , $ response ->get_data () );
443
444
$ next_link = add_query_arg ( array (
444
445
'page ' => 2 ,
445
446
), rest_url ( '/wp/v2/categories ' ) );
@@ -455,6 +456,7 @@ public function test_get_terms_pagination_headers() {
455
456
$ headers = $ response ->get_headers ();
456
457
$ this ->assertEquals ( 51 , $ headers ['X-WP-Total ' ] );
457
458
$ this ->assertEquals ( 6 , $ headers ['X-WP-TotalPages ' ] );
459
+ $ this ->assertCount ( 10 , $ response ->get_data () );
458
460
$ prev_link = add_query_arg ( array (
459
461
'page ' => 2 ,
460
462
), rest_url ( '/wp/v2/categories ' ) );
@@ -470,6 +472,7 @@ public function test_get_terms_pagination_headers() {
470
472
$ headers = $ response ->get_headers ();
471
473
$ this ->assertEquals ( 51 , $ headers ['X-WP-Total ' ] );
472
474
$ this ->assertEquals ( 6 , $ headers ['X-WP-TotalPages ' ] );
475
+ $ this ->assertCount ( 1 , $ response ->get_data () );
473
476
$ prev_link = add_query_arg ( array (
474
477
'page ' => 5 ,
475
478
), rest_url ( '/wp/v2/categories ' ) );
@@ -482,6 +485,7 @@ public function test_get_terms_pagination_headers() {
482
485
$ headers = $ response ->get_headers ();
483
486
$ this ->assertEquals ( 51 , $ headers ['X-WP-Total ' ] );
484
487
$ this ->assertEquals ( 6 , $ headers ['X-WP-TotalPages ' ] );
488
+ $ this ->assertCount ( 0 , $ response ->get_data () );
485
489
$ prev_link = add_query_arg ( array (
486
490
'page ' => 6 ,
487
491
), rest_url ( '/wp/v2/categories ' ) );
0 commit comments