4 * Include dataProvider for tests
7 class CRM_Case_BAO_QueryTest
extends CiviUnitTestCase
{
12 * Ensure CiviCase is enabled.
14 public function setUp() {
16 CRM_Core_BAO_ConfigSetting
::enableComponent('CiviCase');
20 * Check that Qill is calculated correctly.
22 * CRM-17120 check the qill is still calculated after changing function used
23 * to retrieve function.
25 * Note that the Qill doesn't actually appear to have the correct labels to
26 * start with. I didn't attempt to fix that. I just prevented regression.
28 * I could not find anyway to actually do this search with the relevant fields
29 * as parameters & don't know if they exist as legitimate code or code cruft so
30 * this test was the only way I could verify the change.
31 * - case_recent_activity_type
32 * - case_activity_status_id
33 * - case_activity_medium_id
35 public function testWhereClauseSingle() {
38 0 => 'case_recent_activity_type',
45 0 => 'case_activity_status_id',
52 0 => 'case_activity_medium_id',
60 $queryObj = new CRM_Contact_BAO_Query($params, NULL, NULL, FALSE, FALSE, CRM_Contact_BAO_Query
::MODE_CASE
);
61 $this->assertEquals(array(
62 0 => 'Activity Type = Contribution',
63 1 => 'Activity Type = Scheduled',
64 2 => 'Activity Medium = In Person',