public function testResolveValueAsLabelForHeaderCellForAnLinkableAttribute()
 {
     $account1 = AccountTestHelper::createAccountByNameForOwner('account name', Yii::app()->user->userModel);
     $account2 = AccountTestHelper::createAccountByNameForOwner('account name', Yii::app()->user->userModel);
     $displayAttribute = new DisplayAttributeForReportForm('AccountsModule', 'Account', Report::TYPE_SUMMATION);
     $displayAttribute->attributeIndexOrDerivedType = 'name';
     //Make a tooltip for multiple results
     $this->assertEquals('<span id="report-multiple-link-AccountsModule-' . $account2->id . '">account name' . '<span class="tooltip">2</span></span>', $displayAttribute->resolveValueAsLabelForHeaderCell('account name'));
     $this->assertEquals($account1->name, $displayAttribute->resolveValueAsLabelForHeaderCell('account name', true));
 }
 public function testResolveValueAsLabelForHeaderCellForAnAttributeLikeContactState()
 {
     $contactStates = ContactState::getAll();
     $displayAttribute = new DisplayAttributeForReportForm('ContactsModule', 'Contact', Report::TYPE_SUMMATION);
     $displayAttribute->attributeIndexOrDerivedType = 'state';
     $this->assertEquals('Recycled', $contactStates[2]->name);
     $this->assertEquals('Recycled', $displayAttribute->resolveValueAsLabelForHeaderCell($contactStates[2]->id));
 }