Skip to content
This repository was archived by the owner on Dec 16, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
language: php

php:
- 5.5
- 5.6
- 7.0
- 7.3
- hhvm

env:
- GUZZLE_VERSION="6.1.1"
- GUZZLE_VERSION="7.0.1"

before_script: composer install

Expand All @@ -18,4 +16,4 @@ matrix:
allow_failures:
- php: hhvm
- php: 7.0
fast_finish: true
fast_finish: true
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"homepage": "http://developer.constantcontact.com",
"license": "MIT",
"require": {
"php": ">=5.5.0",
"guzzlehttp/guzzle": "^6.1.1"
"php": ">=7.3",
"guzzlehttp/guzzle": "^7.0"
},
"require-dev": {
"phpunit/phpunit": "4.8.21"
"phpunit/phpunit": "^9.0"
},
"authors": [
{
Expand Down
2 changes: 1 addition & 1 deletion src/Ctct/Services/BaseService.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected function convertException($exception) {
$ctctException = new CtctException("Something went wrong", $exception->getCode());
}
$ctctException->setUrl($exception->getRequest()->getUri());
$ctctException->setErrors(json_decode($exception->getResponse()->getBody()->getContents()));
$ctctException->setErrors(json_decode($exception->getResponse()->getBody()->getContents(), true));
return $ctctException;
}
}
6 changes: 3 additions & 3 deletions test/Auth/CtctOAuth2UnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Response;

class CtctOAuth2UnitTest extends PHPUnit_Framework_TestCase {
class CtctOAuth2UnitTest extends \PHPUnit\Framework\TestCase {
/**
* @var Client
*/
Expand All @@ -22,7 +22,7 @@ class CtctOAuth2UnitTest extends PHPUnit_Framework_TestCase {
private $clientSecret = "clientSecret";
private $redirectUri = "redirectUri";

public static function setUpBeforeClass() {
public static function setUpBeforeClass() : void {
$mock = new MockHandler([
new Response(200, array(), JsonLoader::getTokenInfoJson()),
new Response(200, array(), JsonLoader::getAccessTokenJson())
Expand All @@ -31,7 +31,7 @@ public static function setUpBeforeClass() {
self::$client = new Client(['handler' => $handler]);
}

public function setUp() {
public function setUp() : void {
$this->ctctOAuth2 = new CtctOAuth2($this->apiKey, $this->clientSecret, $this->redirectUri);
}

Expand Down
4 changes: 2 additions & 2 deletions test/Services/AccountServiceUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Response;

class AccountServiceUnitTest extends PHPUnit_Framework_TestCase {
class AccountServiceUnitTest extends \PHPUnit\Framework\TestCase {
/**
* @var Client
*/
private static $client;

public static function setUpBeforeClass() {
public static function setUpBeforeClass() : void {
$mock = new MockHandler([
new Response(200, array(), JsonLoader::getVerifiedAddressesJson()),
new Response(200, array(), JsonLoader::getAccountInfoJson())
Expand Down
4 changes: 2 additions & 2 deletions test/Services/ActivityServiceUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Response;

class ActivityServiceUnitTest extends PHPUnit_Framework_TestCase {
class ActivityServiceUnitTest extends \PHPUnit\Framework\TestCase {
/**
* @var Client
*/
private static $client;

public static function setUpBeforeClass() {
public static function setUpBeforeClass() : void {
$mock = new MockHandler([
new Response(200, array(), JsonLoader::getActivity()),
new Response(200, array(), JsonLoader::getActivities()),
Expand Down
4 changes: 2 additions & 2 deletions test/Services/CampaignScheduleServiceUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Response;

class CampaignScheduleServiceUnitTest extends PHPUnit_Framework_TestCase {
class CampaignScheduleServiceUnitTest extends \PHPUnit\Framework\TestCase {
/**
* @var Client
*/
private static $client;

public static function setUpBeforeClass() {
public static function setUpBeforeClass() : void {
self::$client = new Client();
$scheduleJson = JsonLoader::getCampaignScheduleJson();
$mock = new MockHandler([
Expand Down
4 changes: 2 additions & 2 deletions test/Services/CampaignTrackingServiceUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Response;

class CampaignTrackingServiceUnitTest extends PHPUnit_Framework_TestCase {
class CampaignTrackingServiceUnitTest extends \PHPUnit\Framework\TestCase {
/**
* @var Client
*/
private static $client;

public static function setUpBeforeClass() {
public static function setUpBeforeClass() : void {
$mock = new MockHandler([
new Response(200, array(), JsonLoader::getBounces()),
new Response(200, array(), JsonLoader::getClicks()),
Expand Down
4 changes: 2 additions & 2 deletions test/Services/ContactServiceUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Response;

class ContactServiceUnitTest extends PHPUnit_Framework_TestCase {
class ContactServiceUnitTest extends \PHPUnit\Framework\TestCase {
/**
* @var ConstantContact
*/
private static $constantContact;

public static function setUpBeforeClass() {
public static function setUpBeforeClass() : void {
$contactJson = JsonLoader::getContactJson();
$mock = new MockHandler([
new Response(200, array(), JsonLoader::getContactsJson()),
Expand Down
4 changes: 2 additions & 2 deletions test/Services/ContactTrackingServiceUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Response;

class ContactTrackingServiceUnitTest extends PHPUnit_Framework_TestCase {
class ContactTrackingServiceUnitTest extends \PHPUnit\Framework\TestCase {
/**
* @var Client
*/
private static $client;

public static function setUpBeforeClass() {
public static function setUpBeforeClass() : void {
$mock = new MockHandler([
new Response(200, array(), JsonLoader::getBounces()),
new Response(200, array(), JsonLoader::getClicks()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Response;

class EmailMarketingServiceUnitTest extends PHPUnit_Framework_TestCase {
class EmailMarketingServiceUnitTest extends \PHPUnit\Framework\TestCase {
/**
* @var Client
*/
private static $client;

public static function setUpBeforeClass() {
public static function setUpBeforeClass() : void {
$getCampaignJson = JsonLoader::getCampaignJson();
$mock = new MockHandler([
new Response(200, array(), JsonLoader::getCampaignsJson()),
Expand Down
6 changes: 3 additions & 3 deletions test/Services/LibraryServiceUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Response;

class LibraryServiceUnitTest extends PHPUnit_Framework_TestCase {
class LibraryServiceUnitTest extends \PHPUnit\Framework\TestCase {
/**
* @var Client
*/
private static $client;

public static function setUpBeforeClass() {
public static function setUpBeforeClass() : void {
$mock = new MockHandler([
new Response(200, array(), JsonLoader::getLibraryFileJson()),
new Response(200, array(), JsonLoader::getLibraryFilesJson()),
Expand Down Expand Up @@ -180,4 +180,4 @@ public function testGetFileUploadStatus() {
$this->assertEquals("Active", $fileUploadStatus->description);
$this->assertEquals("Active", $fileUploadStatus->status);
}
}
}
4 changes: 2 additions & 2 deletions test/Services/ListServiceUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Response;

class ListServiceUnitTest extends PHPUnit_Framework_TestCase {
class ListServiceUnitTest extends \PHPUnit\Framework\TestCase {
/**
* @var Client
*/
private static $client;

public static function setUpBeforeClass() {
public static function setUpBeforeClass() : void {
self::$client = new Client();
$getListStream = JsonLoader::getListJson();
$mock = new MockHandler([
Expand Down