public static function setUpBeforeClass()
 {
     self::$client = new Client();
     $activityStream = Stream::factory(JsonLoader::getActivity());
     $activitiesStream = Stream::factory(JsonLoader::getActivities());
     $clearListActivityStream = Stream::factory(JsonLoader::getClearListsActivity());
     $exportActivityStream = Stream::factory(JsonLoader::getExportContactsActivity());
     $removeContactsFromListStream = Stream::factory(JsonLoader::getRemoveContactsFromListsActivity());
     $addContactsStream = Stream::factory(JsonLoader::getAddContactsActivity());
     $mock = new Mock([new Response(200, array(), $activityStream), new Response(200, array(), $activitiesStream), new Response(201, array(), $clearListActivityStream), new Response(201, array(), $exportActivityStream), new Response(201, array(), $removeContactsFromListStream), new Response(201, array(), $addContactsStream)]);
     self::$client->getEmitter()->attach($mock);
 }
 public function testAddExportContactsActivity()
 {
     $curlResponse = CurlResponse::create(JsonLoader::getExportContactsActivity(), array('http_code' => 201));
     $this->restClient->expects($this->once())->method('post')->with()->will($this->returnValue($curlResponse));
     $exportContacts = new ExportContacts(array("1", "2"));
     $activity = $this->activityService->addExportContactsActivity("access_token", $exportContacts);
     $this->assertInstanceOf('Ctct\\Components\\Activities\\Activity', $activity);
     $this->assertEquals("a07e1i5nqamhcfeuu0h", $activity->id);
     $this->assertEquals("EXPORT_CONTACTS", $activity->type);
     $this->assertEquals(0, $activity->error_count);
     $this->assertEquals(0, $activity->contact_count);
 }