public function testContactTypes()
 {
     $byName = array('Individual' => 'Individual', 'Household' => 'Household', 'Organization' => 'Organization');
     $byId = array(1 => 'Individual', 2 => 'Household', 3 => 'Organization');
     // By default this should return an array keyed by name
     $result = CRM_Contact_DAO_Contact::buildOptions('contact_type');
     $this->assertEquals($byName, $result);
     // But we can also fetch by ID
     $result = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'contact_type', array('keyColumn' => 'id', 'labelColumn' => 'name'));
     $this->assertEquals($byId, $result);
     // Make sure flip param works
     $result = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'contact_type', array('keyColumn' => 'id', 'labelColumn' => 'name', 'flip' => TRUE));
     $this->assertEquals(array_flip($byId), $result);
 }