本文整理汇总了PHP中Addressbook_Controller_Contact::searchCount方法的典型用法代码示例。如果您正苦于以下问题:PHP Addressbook_Controller_Contact::searchCount方法的具体用法?PHP Addressbook_Controller_Contact::searchCount怎么用?PHP Addressbook_Controller_Contact::searchCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Addressbook_Controller_Contact
的用法示例。
在下文中一共展示了Addressbook_Controller_Contact::searchCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testCreationTimeEqualsOperator
/**
* test equals operator of creation time filter
*/
public function testCreationTimeEqualsOperator()
{
$contact = $this->_addContact();
$filter = new Addressbook_Model_ContactFilter(array(array('field' => 'container_id', 'operator' => 'equals', 'value' => $contact->container_id), array('field' => 'owner', 'operator' => 'equals', 'value' => Zend_Registry::get('currentAccount')->getId())));
$count1 = $this->_instance->searchCount($filter);
$date = Tinebase_DateTime::now();
$filter = new Addressbook_Model_ContactFilter(array(array('field' => 'creation_time', 'operator' => 'equals', 'value' => $date->toString('Y-m-d')), array('field' => 'container_id', 'operator' => 'equals', 'value' => $contact->container_id), array('field' => 'owner', 'operator' => 'equals', 'value' => Zend_Registry::get('currentAccount')->getId())));
$count2 = $this->_instance->searchCount($filter);
$this->assertEquals($count1, $count2);
}