Skip to content

Commit 4daeec2

Browse files
committed
Testing changes against multiple versions of PHP
1 parent c584eed commit 4daeec2

File tree

221 files changed

+441
-1288
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

221 files changed

+441
-1288
lines changed

.travis.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,32 @@ language: php
22

33
sudo: false
44

5-
dist: trusty
6-
75
env:
86
- TEST_SUITE=samples
97

10-
php:
11-
- 5.6
12-
- 7.0
13-
- 7.1
8+
matrix:
9+
include:
10+
- php: 5.6
11+
env: PHPUNIT_VERSION=5.6.*
12+
dist: trusty
13+
- php: 7.0
14+
env: PHPUNIT_VERSION=5.6.*
15+
dist: trusty
16+
- php: 7.1
17+
env: PHPUNIT_VERSION=5.7.*
18+
dist: trusty
19+
- php: 7.2
20+
env: PHPUNIT_VERSION=8.5.*
21+
dist: bionic
22+
- php: 7.3
23+
env: PHPUNIT_VERSION=9.5.*
24+
dist: bionic
25+
- php: 7.4
26+
env: PHPUNIT_VERSION=9.5.*
27+
dist: bionic
28+
- php: 8.0
29+
env: PHPUNIT_VERSION=9.5.*
30+
dist: bionic
1431

1532
before_install:
1633
# execute all of the commands which need to be executed
@@ -20,7 +37,8 @@ before_install:
2037
install:
2138
# install all of the dependencies we need here
2239
- pecl install xmldiff
23-
- composer install --prefer-dist
40+
- composer require "phpunit/phpunit:${PHPUNIT_VERSION}" --no-update
41+
- composer update --prefer-dist
2442

2543
before_script:
2644
# execute all of the commands which need to be executed
@@ -30,7 +48,7 @@ before_script:
3048
script:
3149
# execute all of the tests or other commands to determine
3250
# whether the build will pass or fail
33-
- if [[ "$TEST_SUITE" == "samples" ]]; then phpenv config-rm xdebug.ini; cp -R lib sample-code-php/; cp -R vendor sample-code-php/; cd sample-code-php; vendor/phpunit/phpunit/phpunit test-runner.php .; fi
51+
- if [[ "$TEST_SUITE" == "samples" ]]; then phpenv config-rm xdebug.ini; cp -R lib sample-code-php/; cp -R vendor sample-code-php/; cd sample-code-php; vendor/phpunit/phpunit/phpunit TestRunner.php .; fi
3452

3553
after_script:
3654
# - if [[ "$TEST_SUITE" == "coverage" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi

composer.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
"ext-curl": "*",
1111
"ext-json": "*"
1212
},
13-
"require-dev": {
14-
"phpunit/phpunit": "~4.0",
15-
"phpmd/phpmd": "~2.0"
16-
},
1713
"autoload": {
1814
"classmap": ["lib"]
1915
},

lib/net/authorize/api/contract/v1/ANetApiRequestType.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,13 @@ function ($val){
122122
}
123123
}
124124
}
125-
if (get_parent_class() == ""){
126-
return $values;
127-
}
128-
else{
129-
return array_merge(parent::jsonSerialize(), $values);
130-
}
125+
return $values;
131126
}
132127

133128
// Json Set Code
134129
public function set($data)
135130
{
136-
if(is_array($data) || is_object($data)) {
131+
if(is_array($data) || is_object($data)) {
137132
$mapper = \net\authorize\util\Mapper::Instance();
138133
foreach($data AS $key => $value) {
139134
$classDetails = $mapper->getClass(get_class() , $key);

lib/net/authorize/api/contract/v1/ANetApiResponseType.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,18 +120,13 @@ function ($val){
120120
}
121121
}
122122
}
123-
if (get_parent_class() == ""){
124-
return $values;
125-
}
126-
else{
127-
return array_merge(parent::jsonSerialize(), $values);
128-
}
123+
return $values;
129124
}
130125

131126
// Json Set Code
132127
public function set($data)
133128
{
134-
if(is_array($data) || is_object($data)) {
129+
if(is_array($data) || is_object($data)) {
135130
$mapper = \net\authorize\util\Mapper::Instance();
136131
foreach($data AS $key => $value) {
137132
$classDetails = $mapper->getClass(get_class() , $key);

lib/net/authorize/api/contract/v1/ARBCancelSubscriptionRequest.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,8 @@ function ($val){
6363
}
6464
}
6565
}
66-
if (get_parent_class() == ""){
67-
return $values;
68-
}
69-
else{
70-
return array_merge(parent::jsonSerialize(), $values);
71-
}
66+
return array_merge(parent::jsonSerialize(), $values);
7267
}
73-
68+
7469
}
7570

lib/net/authorize/api/contract/v1/ARBCancelSubscriptionResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class ARBCancelSubscriptionResponse extends ANetApiResponseType
1212
// Json Set Code
1313
public function set($data)
1414
{
15-
if(is_array($data) || is_object($data)) {
15+
if(is_array($data) || is_object($data)) {
1616
$mapper = \net\authorize\util\Mapper::Instance();
1717
foreach($data AS $key => $value) {
1818
$classDetails = $mapper->getClass(get_class() , $key);

lib/net/authorize/api/contract/v1/ARBCreateSubscriptionRequest.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,8 @@ function ($val){
6363
}
6464
}
6565
}
66-
if (get_parent_class() == ""){
67-
return $values;
68-
}
69-
else{
70-
return array_merge(parent::jsonSerialize(), $values);
71-
}
66+
return array_merge(parent::jsonSerialize(), $values);
7267
}
73-
68+
7469
}
7570

lib/net/authorize/api/contract/v1/ARBCreateSubscriptionResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function setProfile(\net\authorize\api\contract\v1\CustomerProfileIdType
6666
// Json Set Code
6767
public function set($data)
6868
{
69-
if(is_array($data) || is_object($data)) {
69+
if(is_array($data) || is_object($data)) {
7070
$mapper = \net\authorize\util\Mapper::Instance();
7171
foreach($data AS $key => $value) {
7272
$classDetails = $mapper->getClass(get_class() , $key);

lib/net/authorize/api/contract/v1/ARBGetSubscriptionListRequest.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,8 @@ function ($val){
118118
}
119119
}
120120
}
121-
if (get_parent_class() == ""){
122-
return $values;
123-
}
124-
else{
125-
return array_merge(parent::jsonSerialize(), $values);
126-
}
121+
return array_merge(parent::jsonSerialize(), $values);
127122
}
128-
123+
129124
}
130125

lib/net/authorize/api/contract/v1/ARBGetSubscriptionListResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function setSubscriptionDetails(array $subscriptionDetails)
102102
// Json Set Code
103103
public function set($data)
104104
{
105-
if(is_array($data) || is_object($data)) {
105+
if(is_array($data) || is_object($data)) {
106106
$mapper = \net\authorize\util\Mapper::Instance();
107107
foreach($data AS $key => $value) {
108108
$classDetails = $mapper->getClass(get_class() , $key);

0 commit comments

Comments
 (0)