Skip to content

Commit

Permalink
Merge pull request #14340 from eileenmcnaughton/select2
Browse files Browse the repository at this point in the history
Unit test for FGB error in #14331
  • Loading branch information
seamuslee001 authored May 26, 2019
2 parents 395b71c + 2365bc9 commit c7d9deb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/phpunit/CRM/Contact/SelectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,17 @@ public function testSelectorQuery($dataSet) {
]);
$rows = $selector->getRows(CRM_Core_Action::VIEW, 0, 50, '');
$this->assertEquals(1, count($rows));

CRM_Core_DAO::reenableFullGroupByMode();
$rows = $selector->getRows(CRM_Core_Action::VIEW, 0, 50, '');

$sortChar = $selector->alphabetQuery()->fetchAll();
// sort name is stored in '<last_name>, <first_name>' format, as per which the first character would be B of Bond
$this->assertEquals('B', $sortChar[0]['sort_name']);
$this->assertEquals($contactID, key($rows));

CRM_Core_DAO::reenableFullGroupByMode();
$selector->getQueryObject()->getCachedContacts([$contactID], FALSE);
}
}
}
Expand Down

0 comments on commit c7d9deb

Please sign in to comment.