<?php

class Test_34338 extends WP_UnitTestCase
{
    function test_remove_object_terms()
    {
        $post_id = $this->factory->post->create();
        wp_set_object_terms($post_id, 'test', 'category');

        // Pollute the cache
        $terms = get_the_terms($post_id, 'category');

        wp_remove_object_terms($post_id, 'test', 'category');
        $this->assertEquals(false, get_the_terms($post_id, 'category')); // should work but not work

        wp_set_object_terms($post_id, null, 'category');
        $this->assertEquals(false, get_the_terms($post_id, 'category')); // work
    }
}
