/**
  * test searchContainers
  */
 public function testSearchContainers()
 {
     $personalAdb = Addressbook_Controller_Contact::getInstance()->getDefaultAddressbook();
     $addressbook = Tinebase_Application::getInstance()->getApplicationByName('Addressbook');
     $filter = array(array('field' => 'application_id', 'operator' => 'equals', 'value' => $addressbook->getId()), array('field' => 'type', 'operator' => 'equals', 'value' => Tinebase_Model_Container::TYPE_PERSONAL), array('field' => 'name', 'operator' => 'contains', 'value' => Tinebase_Core::getUser()->accountFirstName));
     $result = $this->_json->searchContainers($filter, array());
     $this->assertGreaterThan(0, $result['totalcount']);
     $this->assertEquals(3, count($result['filter']));
     $found = FALSE;
     foreach ($result['results'] as $container) {
         if ($container['id'] === $personalAdb->getId()) {
             $found = TRUE;
         }
     }
     $this->assertTrue($found);
 }