From 5a9810356750546d8bd852046734f04b251c7c30 Mon Sep 17 00:00:00 2001 From: "K. Adam White" Date: Thu, 15 Aug 2019 23:08:31 +0000 Subject: [PATCH] REST API: Add @ticket annotation to test from [45813]. Props birgire. See #42209. git-svn-id: https://develop.svn.wordpress.org/trunk@45815 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/rest-api/rest-taxonomies-controller.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/phpunit/tests/rest-api/rest-taxonomies-controller.php b/tests/phpunit/tests/rest-api/rest-taxonomies-controller.php index 6c4a9cfae1..7b367b09a1 100644 --- a/tests/phpunit/tests/rest-api/rest-taxonomies-controller.php +++ b/tests/phpunit/tests/rest-api/rest-taxonomies-controller.php @@ -195,6 +195,9 @@ class WP_Test_REST_Taxonomies_Controller extends WP_Test_REST_Controller_Testcas ); } + /** + * @ticket 42209 + */ public function test_object_types_is_an_array_if_object_type_is_unregistered() { register_taxonomy_for_object_type( 'category', 'page' ); register_taxonomy_for_object_type( 'category', 'attachment' ); @@ -208,6 +211,7 @@ class WP_Test_REST_Taxonomies_Controller extends WP_Test_REST_Controller_Testcas $this->assertEquals( 'post', $types[0] ); $this->assertArrayHasKey( 1, $types ); $this->assertEquals( 'attachment', $types[1] ); + $this->assertEquals( 2, count( $types ) ); } public function test_get_item_schema() {