Exemplo n.º 1
0
 /**
  *  Test civicrm_constant_get( 'locationType' ) with all=true
  */
 public function testLocationTypeAll()
 {
     // needed to get rid of cached values from previous tests
     CRM_Core_Pseudoconstant::flush('locationType');
     //  Testing on default set provided by civicrm_data.mysql
     $result = civicrm_constant_get('locationType', array('all' => true));
     $this->assertEquals(5, count($result), "In line " . __LINE__);
     $this->assertContains('Home', $result, "In line " . __LINE__);
     $this->assertContains('Work', $result, "In line " . __LINE__);
     $this->assertContains('Main', $result, "In line " . __LINE__);
     $this->assertContains('Other', $result, "In line " . __LINE__);
     $this->assertContains('Billing', $result, "In line " . __LINE__);
     $this->assertTrue(empty($result['is_error']), "In line " . __LINE__);
 }