public function testReplaceLabel()
 {
     $o_search = caGetSearchInstance('ca_objects');
     $o_result = $o_search->search('foo');
     $this->assertEquals(1, $o_result->numHits(), 'foo should be indexed');
     $o_result = $o_search->search('bar');
     $this->assertEquals(0, $o_result->numHits(), 'bar should not be indexed yet');
     $this->opt_object->removeAllLabels();
     $this->opt_object->addLabel(array('name' => 'bar', 'name_sort' => 'bar'), 1, null, true);
     $o_search = caGetSearchInstance('ca_objects');
     $o_result = $o_search->search('foo');
     $this->assertEquals(0, $o_result->numHits(), 'foo should not be indexed anymore');
     $o_result = $o_search->search('bar');
     $this->assertEquals(1, $o_result->numHits(), 'bar should now be indexed instead');
 }