public function test_register_taxonomies()
 {
     global $wp_post_types;
     $post_type = rand_str();
     $post_type_object = new WP_Post_Type($post_type, array('taxonomies' => array('post_tag')));
     $wp_post_types[$post_type] = $post_type_object;
     $post_type_object->register_taxonomies();
     $taxonomies = get_object_taxonomies($post_type);
     $post_type_object->unregister_taxonomies();
     $taxonomies_after = get_object_taxonomies($post_type);
     unset($wp_post_types[$post_type]);
     $this->assertEqualSets(array('post_tag'), $taxonomies);
     $this->assertEqualSets(array(), $taxonomies_after);
 }