/**
  * Tests the mapping of CiviCRM group memberships to an array of Mailchimp
  * interest Ids => Bool.
  *
  * @depends testGetMCInterestGroupings
  * @group interests
  */
 public function testGetComparableInterestsFromCiviCrmGroups()
 {
     $sync = new CRM_Mailchimp_Sync(static::$test_list_id);
     $g = static::C_TEST_MEMBERSHIP_GROUP_NAME;
     $i = static::C_TEST_INTEREST_GROUP_NAME_1;
     $j = static::C_TEST_INTEREST_GROUP_NAME_2;
     $cases = ["{$g},{$i}" => ['interestId1' => TRUE, 'interestId2' => FALSE], "{$g}" => ['interestId1' => FALSE, 'interestId2' => FALSE], "{$i}" => ['interestId1' => TRUE, 'interestId2' => FALSE], "{$j},other list name,{$g},{$i},and another" => ['interestId1' => TRUE, 'interestId2' => TRUE], "other list name,{$g},{$i},and another" => ['interestId1' => TRUE, 'interestId2' => FALSE], "other list name,and another" => ['interestId1' => FALSE, 'interestId2' => FALSE], "" => ['interestId1' => FALSE, 'interestId2' => FALSE]];
     foreach ($cases as $input => $expected) {
         $ints = $sync->getComparableInterestsFromCiviCrmGroups($input, 'push');
         $this->assertEquals($expected, $ints, "mapping failed for test '{$input}'");
     }
     // We didn't change the fixture.
     static::$fixture_should_be_reset = FALSE;
 }