Skip to content

Commit

Permalink
Partial updates of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
przemekperon committed Jan 28, 2017
1 parent a792d81 commit 42dfe28
Show file tree
Hide file tree
Showing 158 changed files with 251 additions and 208 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ php:
- 5.4
- 5.5
- 5.6
- hhvm
- 7

before_script:
- travis_retry composer self-update
- travis_retry composer install --prefer-source --no-interaction --dev

script: phpunit
script: cd test-cases && phpunit --bootstrap bootstrap.php
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
"illuminate/support": "5.*"
},
"require-dev": {
"phpunit/phpunit": "4.*"
"phpunit/phpunit": "5.*"
},
"autoload": {
"psr-0": {
"Sonnenglas\\AmazonMws": "src/"
"psr-4": {
"Sonnenglas\\AmazonMws\\": "src"
}
},
"minimum-stability": "stable"
Expand Down
22 changes: 0 additions & 22 deletions nbproject/project.properties

This file was deleted.

9 changes: 0 additions & 9 deletions nbproject/project.xml

This file was deleted.

29 changes: 15 additions & 14 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
>
<phpunit
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
colors="true"
strict="false"
processIsolation="false"
stopOnFailure="true"
syntaxCheck="true"
backupGlobals="false"
bootstrap="tests/bootstrap.php"
verbose="true">
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix=".php">./tests/</directory>
<testsuite name='all'>
<directory>tests/classes/</directory>
</testsuite>
</testsuites>
</phpunit>
</phpunit>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use DateTime;
use Exception;


/**
* Copyright 2013 CPI Group, LLC
*
Expand Down Expand Up @@ -129,7 +130,7 @@ abstract class AmazonCore
* from the list to use as a response. See <i>setMock</i> for more information.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
protected function __construct($s, $mock = false, $m = null, $config = null)
protected function __construct($s, $mock = false, $m = null)
{
$this->setConfig();
$this->setStore($s);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ class AmazonFeed extends AmazonFeedsCore
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $mock = false, $m = null, $config = null)
public function __construct($s, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);
include($this->env);

$this->options['Action'] = 'SubmitFeed';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ class AmazonFeedList extends AmazonFeedsCore implements Iterator{
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $mock = false, $m = null, $config = null){
parent::__construct($s, $mock, $m, $config);
public function __construct($s, $mock = false, $m = null){
parent::__construct($s, $mock, $m);
include($this->env);

if(isset($THROTTLE_LIMIT_FEEDLIST)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ class AmazonFeedResult extends AmazonFeedsCore
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $id = null, $mock = false, $m = null, $config = null)
public function __construct($s, $id = null, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);
include($this->env);

if ($id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ abstract class AmazonFeedsCore extends AmazonCore
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $mock = false, $m = null, $config = null)
public function __construct($s, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);
include($this->env);

$this->urlbranch = '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ class AmazonFulfillmentOrder extends AmazonOutboundCore
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $id = null, $mock = false, $m = null, $config = null)
public function __construct($s, $id = null, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);

if ($id) {
$this->setOrderId($id);
Expand All @@ -65,7 +65,7 @@ public function __construct($s, $id = null, $mock = false, $m = null, $config =
*/
public function setOrderId($s)
{
if (is_string($s)) {
if ($s !== null) {
$this->options['SellerFulfillmentOrderId'] = $s;
} else {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ class AmazonFulfillmentOrderCreator extends AmazonOutboundCore
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $mock = false, $m = null, $config = null)
public function __construct($s, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);

$this->options['Action'] = 'CreateFulfillmentOrder';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ class AmazonFulfillmentOrderList extends AmazonOutboundCore implements \Iterator
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $mock = false, $m = null, $config = null)
public function __construct($s, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);

$this->options['Action'] = 'ListAllFulfillmentOrders';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ class AmazonFulfillmentPreview extends AmazonOutboundCore
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $mock = false, $m = null, $config = null)
public function __construct($s, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);

$this->options['Action'] = 'GetFulfillmentPreview';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ abstract class AmazonInboundCore extends AmazonCore
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $mock = false, $m = null, $config = null)
public function __construct($s, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);
include($this->env);

if (isset($AMAZON_VERSION_INBOUND)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ abstract class AmazonInventoryCore extends AmazonCore
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $mock = false, $m = null, $config = null)
public function __construct($s, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);
include($this->env);

if (isset($AMAZON_VERSION_INVENTORY)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ class AmazonInventoryList extends AmazonInventoryCore implements \Iterator
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $mock = false, $m = null, $config = null)
public function __construct($s, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ class AmazonOrder extends AmazonOrderCore
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $id = null, $data = null, $mock = false, $m = null, $config = null)
public function __construct($s, $id = null, $data = null, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);
include($this->env);

if ($id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ abstract class AmazonOrderCore extends AmazonCore
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $mock = false, $m = null, $config = null)
public function __construct($s, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);
include($this->env);

if (isset($AMAZON_VERSION_ORDERS)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ class AmazonOrderItemList extends AmazonOrderCore implements Iterator
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $id = null, $mock = false, $m = null, $config = null)
public function __construct($s, $id = null, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);
include($this->env);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ class AmazonOrderList extends AmazonOrderCore implements Iterator
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $mock = false, $m = null, $config = null)
public function __construct($s, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);
include($this->env);
// if (file_exists($this->config)){
// include($this->config);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ class AmazonOrderSet extends AmazonOrderCore implements \Iterator
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $o = null, $mock = false, $m = null, $config = null)
public function __construct($s, $o = null, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);
$this->i = 0;
include($this->env);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ abstract class AmazonOutboundCore extends AmazonCore
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $mock = false, $m = null, $config = null)
public function __construct($s, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);
include($this->env);

if (isset($AMAZON_VERSION_OUTBOUND)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ class AmazonPackageTracker extends AmazonOutboundCore
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $id = null, $mock = false, $m = null, $config = null)
public function __construct($s, $id = null, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);

if ($id) {
$this->setPackageNumber($id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ class AmazonParticipationList extends AmazonSellersCore
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $mock = false, $m = null, $config = null)
public function __construct($s, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);
include($this->env);

if (isset($THROTTLE_LIMIT_SELLERS)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ class AmazonProduct extends AmazonProductsCore
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $data = null, $mock = false, $m = null, $config = null)
public function __construct($s, $data = null, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);

if ($data) {
$this->loadXML($data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ class AmazonProductInfo extends AmazonProductsCore
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $mock = false, $m = null, $config = null)
public function __construct($s, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ class AmazonProductList extends AmazonProductsCore implements \Iterator
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $mock = false, $m = null, $config = null)
public function __construct($s, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);
include($this->env);

$this->options['Action'] = 'GetMatchingProductForId';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ class AmazonProductSearch extends AmazonProductsCore
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
*/
public function __construct($s, $q = null, $mock = false, $m = null, $config = null)
public function __construct($s, $q = null, $mock = false, $m = null)
{
parent::__construct($s, $mock, $m, $config);
parent::__construct($s, $mock, $m);
include($this->env);

if ($q) {
Expand Down
Loading

0 comments on commit 42dfe28

Please sign in to comment.