protected function getDropDownArray()
 {
     return ContactsUtil::getContactStateDataFromStartingStateKeyedByIdAndLabelByLanguage(Yii::app()->language);
 }
Ejemplo n.º 2
0
 /**
  * @depends testResolveStateLabelByLanguage
  */
 public function testGetContactStateDataFromStartingStateKeyedByIdAndLabelByLanguage()
 {
     $qualifiedStates = ContactState::getByName('Qualified');
     $customerStates = ContactState::getByName('Customer');
     $data = ContactsUtil::getContactStateDataFromStartingStateKeyedByIdAndLabelByLanguage('en');
     $compareData = array($qualifiedStates[0]->id => 'Qualified', $customerStates[0]->id => 'Customer');
     $this->assertEquals($compareData, $data);
     $data = ContactsUtil::getContactStateDataFromStartingStateKeyedByIdAndLabelByLanguage('fr');
     $compareData = array($qualifiedStates[0]->id => 'QualifiedFr', $customerStates[0]->id => 'Client');
     $this->assertEquals($compareData, $data);
 }
 protected static function makeStatesDataAndLabels()
 {
     return ContactsUtil::getContactStateDataFromStartingStateKeyedByIdAndLabelByLanguage(Yii::app()->language);
 }