コード例 #1
0
 /**
  *  Test CRM_Contact_Form_Search_Custom_Group::where( )
  *  With true argument it returns list of contact IDs
  */
 public function testWhereTrue()
 {
     $formValues = array(CRM_Core_Form::CB_PREFIX . '17' => TRUE, CRM_Core_Form::CB_PREFIX . '23' => TRUE);
     $obj = new CRM_Contact_Form_Search_Custom_Group($formValues);
     $this->assertEquals(' (1)  AND contact_a.id IN ( 17, 23 )', $obj->where(TRUE), 'In line ' . __LINE__);
 }
コード例 #2
0
ファイル: SampleTest.php プロジェクト: hyebahi/civicrm-core
 /**
  *  Test CRM_Contact_Form_Search_Custom_Sample::templateFile()
  *  Returns the path to the file as a string
  */
 public function testTemplateFile()
 {
     $formValues = array();
     $obj = new CRM_Contact_Form_Search_Custom_Group($formValues);
     $fileName = $obj->templateFile();
     $this->assertTrue(is_string($fileName));
     //FIXME: we would need to search the include path to do the following
     //$this->assertTrue( file_exists( $fileName ) );
 }