projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a6264bc
)
CiviMailUtils::assertRecipients - Fix sorting of recipients
author
Tim Otten
<totten@civicrm.org>
Tue, 12 May 2015 04:07:35 +0000
(21:07 -0700)
committer
Tim Otten
<totten@civicrm.org>
Mon, 15 Jun 2015 17:34:03 +0000
(10:34 -0700)
tests/phpunit/CiviTest/CiviMailUtils.php
patch
|
blob
|
blame
|
history
diff --git
a/tests/phpunit/CiviTest/CiviMailUtils.php
b/tests/phpunit/CiviTest/CiviMailUtils.php
index e1450bd3d959410d2287f81e1861632fc88566f0..ff9767786eaec96d2fdc673529aa760bd38f6965 100644
(file)
--- a/
tests/phpunit/CiviTest/CiviMailUtils.php
+++ b/
tests/phpunit/CiviTest/CiviMailUtils.php
@@
-289,8
+289,14
@@
class CiviMailUtils extends PHPUnit_Framework_TestCase {
foreach ($this->getAllMessages('ezc') as $message) {
$recipients[] = CRM_Utils_Array::collect('email', $message->to);
}
- sort($recipients);
- sort($expectedRecipients);
+ $cmp = function($a, $b) {
+ if ($a[0] == $b[0]) {
+ return 0;
+ }
+ return ($a[0] < $b[0]) ? 1 : -1;
+ };
+ usort($recipients, $cmp);
+ usort($expectedRecipients, $cmp);
$this->_ut->assertEquals(
$expectedRecipients,
$recipients,