Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #27 from pmclain/develop
Browse files Browse the repository at this point in the history
v1.1.0
  • Loading branch information
pmclain authored Jan 5, 2018
2 parents 4c1f0a9 + 24ab3d2 commit fe56081
Show file tree
Hide file tree
Showing 95 changed files with 777 additions and 1,101 deletions.
26 changes: 26 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
sudo: required
dist: trusty
group: edge
addons:
apt:
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
- postfix
hosts:
- magento2.travis
language: php
php:
- 7.1
env:
global:
- COMPOSER_BIN_DIR=~/bin
matrix:
- TEST_SUITE=unit
cache:
apt: true
directories:
- $HOME/.composer/cache
before_script: ./.travis/before_script.sh
script: phpunit -c magento2/dev/tests/$TEST_SUITE
63 changes: 63 additions & 0 deletions .travis/before_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/usr/bin/env bash

set -e
trap '>&2 echo Error: Command \`$BASH_COMMAND\` on line $LINENO failed with exit code $?' ERR

# mock mail
sudo service postfix stop
echo # print a newline
smtp-sink -d "%d.%H.%M.%S" localhost:2500 1000 &
echo 'sendmail_path = "/usr/sbin/sendmail -t -i "' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/sendmail.ini

# disable xdebug and adjust memory limit
echo > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
echo 'memory_limit = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
phpenv rehash;

composer selfupdate

# clone main magento github repository
git clone --branch 2.2.2 --depth=1 https://github.com/magento/magento2

# install Magento
cd magento2

# add composer package under test, composer require will trigger update/install
composer config minimum-stability dev
composer config repositories.travis_to_test git https://github.com/pmclain/module-stripe.git
composer require pmclain/module-stripe:dev-master#$TRAVIS_COMMIT

# prepare for test suite
case $TEST_SUITE in
integration)
cp vendor/pmclain/module-stripe/Test/Integration/phpunit.xml.dist dev/tests/integration/phpunit.xml

cd dev/tests/integration

# create database and move db config into place
mysql -uroot -e '
SET @@global.sql_mode = NO_ENGINE_SUBSTITUTION;
CREATE DATABASE magento_integration_tests;
'
mv etc/install-config-mysql.travis.php.dist etc/install-config-mysql.php

cd ../../..
;;
static)
cd dev/tests/static

echo "==> preparing changed files list"
changed_files_ce="$TRAVIS_BUILD_DIR/dev/tests/static/testsuite/Magento/Test/_files/changed_files_ce.txt"
php get_github_changes.php \
--output-file="$changed_files_ce" \
--base-path="$TRAVIS_BUILD_DIR" \
--repo='https://github.com/magento/magento2.git' \
--branch="$TRAVIS_BRANCH"
cat "$changed_files_ce" | sed 's/^/ + including /'

cd ../../..
;;
unit)
cp vendor/pmclain/module-stripe/Test/Unit/phpunit.xml.dist dev/tests/unit/phpunit.xml
;;
esac
8 changes: 4 additions & 4 deletions Block/Customer/CardRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* Pmclain_Stripe extension
* NOTICE OF LICENSE
*
* This source file is subject to the GPL v3 License
* This source file is subject to the OSL 3.0 License
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://www.gnu.org/licenses/gpl.txt
* https://opensource.org/licenses/osl-3.0.php
*
* @category Pmclain
* @package Pmclain_Stripe
* @copyright Copyright (c) 2017
* @license https://www.gnu.org/licenses/gpl.txt GPL v3 License
* @copyright Copyright (c) 2017-2018
* @license Open Software License (OSL 3.0)
*/
namespace Pmclain\Stripe\Block\Customer;

Expand Down
8 changes: 4 additions & 4 deletions Block/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* Pmclain_Stripe extension
* NOTICE OF LICENSE
*
* This source file is subject to the GPL v3 License
* This source file is subject to the OSL 3.0 License
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://www.gnu.org/licenses/gpl.txt
* https://opensource.org/licenses/osl-3.0.php
*
* @category Pmclain
* @package Pmclain_Stripe
* @copyright Copyright (c) 2017
* @license https://www.gnu.org/licenses/gpl.txt GPL v3 License
* @copyright Copyright (c) 2017-2018
* @license Open Software License (OSL 3.0)
*/
namespace Pmclain\Stripe\Block;

Expand Down
8 changes: 4 additions & 4 deletions Block/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* Pmclain_Stripe extension
* NOTICE OF LICENSE
*
* This source file is subject to the GPL v3 License
* This source file is subject to the OSL 3.0 License
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://www.gnu.org/licenses/gpl.txt
* https://opensource.org/licenses/osl-3.0.php
*
* @category Pmclain
* @package Pmclain_Stripe
* @copyright Copyright (c) 2017
* @license https://www.gnu.org/licenses/gpl.txt GPL v3 License
* @copyright Copyright (c) 2017-2018
* @license Open Software License (OSL 3.0)
*/
namespace Pmclain\Stripe\Block;

Expand Down
9 changes: 4 additions & 5 deletions Block/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@
* Pmclain_Stripe extension
* NOTICE OF LICENSE
*
* This source file is subject to the GPL v3 License
* This source file is subject to the OSL 3.0 License
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://www.gnu.org/licenses/gpl.txt
* https://opensource.org/licenses/osl-3.0.php
*
* @category Pmclain
* @package Pmclain_Stripe
* @copyright Copyright (c) 2017
* @license https://www.gnu.org/licenses/gpl.txt GPL v3 License
* @copyright Copyright (c) 2017-2018
* @license Open Software License (OSL 3.0)
*/

namespace Pmclain\Stripe\Block;

use Pmclain\Stripe\Model\Ui\ConfigProvider;
Expand Down
8 changes: 4 additions & 4 deletions Gateway/Command/CaptureStrategyCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* Pmclain_Stripe extension
* NOTICE OF LICENSE
*
* This source file is subject to the GPL v3 License
* This source file is subject to the OSL 3.0 License
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://www.gnu.org/licenses/gpl.txt
* https://opensource.org/licenses/osl-3.0.php
*
* @category Pmclain
* @package Pmclain_Stripe
* @copyright Copyright (c) 2017
* @license https://www.gnu.org/licenses/gpl.txt GPL v3 License
* @copyright Copyright (c) 2017-2018
* @license Open Software License (OSL 3.0)
*/
namespace Pmclain\Stripe\Gateway\Command;

Expand Down
8 changes: 4 additions & 4 deletions Gateway/Config/CanVoidHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* Pmclain_Stripe extension
* NOTICE OF LICENSE
*
* This source file is subject to the GPL v3 License
* This source file is subject to the OSL 3.0 License
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://www.gnu.org/licenses/gpl.txt
* https://opensource.org/licenses/osl-3.0.php
*
* @category Pmclain
* @package Pmclain_Stripe
* @copyright Copyright (c) 2017
* @license https://www.gnu.org/licenses/gpl.txt GPL v3 License
* @copyright Copyright (c) 2017-2018
* @license Open Software License (OSL 3.0)
*/
namespace Pmclain\Stripe\Gateway\Config;

Expand Down
8 changes: 4 additions & 4 deletions Gateway/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* Pmclain_Stripe extension
* NOTICE OF LICENSE
*
* This source file is subject to the GPL v3 License
* This source file is subject to the OSL 3.0 License
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://www.gnu.org/licenses/gpl.txt
* https://opensource.org/licenses/osl-3.0.php
*
* @category Pmclain
* @package Pmclain_Stripe
* @copyright Copyright (c) 2017
* @license https://www.gnu.org/licenses/gpl.txt GPL v3 License
* @copyright Copyright (c) 2017-2018
* @license Open Software License (OSL 3.0)
*/
namespace Pmclain\Stripe\Gateway\Config;

Expand Down
8 changes: 4 additions & 4 deletions Gateway/Helper/SubjectReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* Pmclain_Stripe extension
* NOTICE OF LICENSE
*
* This source file is subject to the GPL v3 License
* This source file is subject to the OSL 3.0 License
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://www.gnu.org/licenses/gpl.txt
* https://opensource.org/licenses/osl-3.0.php
*
* @category Pmclain
* @package Pmclain_Stripe
* @copyright Copyright (c) 2017
* @license https://www.gnu.org/licenses/gpl.txt GPL v3 License
* @copyright Copyright (c) 2017-2018
* @license Open Software License (OSL 3.0)
*/
namespace Pmclain\Stripe\Gateway\Helper;

Expand Down
8 changes: 4 additions & 4 deletions Gateway/Http/Client/AbstractTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* Pmclain_Stripe extension
* NOTICE OF LICENSE
*
* This source file is subject to the GPL v3 License
* This source file is subject to the OSL 3.0 License
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://www.gnu.org/licenses/gpl.txt
* https://opensource.org/licenses/osl-3.0.php
*
* @category Pmclain
* @package Pmclain_Stripe
* @copyright Copyright (c) 2017
* @license https://www.gnu.org/licenses/gpl.txt GPL v3 License
* @copyright Copyright (c) 2017-2018
* @license Open Software License (OSL 3.0)
*/
namespace Pmclain\Stripe\Gateway\Http\Client;

Expand Down
8 changes: 4 additions & 4 deletions Gateway/Http/Client/TransactionRefund.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* Pmclain_Stripe extension
* NOTICE OF LICENSE
*
* This source file is subject to the GPL v3 License
* This source file is subject to the OSL 3.0 License
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://www.gnu.org/licenses/gpl.txt
* https://opensource.org/licenses/osl-3.0.php
*
* @category Pmclain
* @package Pmclain_Stripe
* @copyright Copyright (c) 2017
* @license https://www.gnu.org/licenses/gpl.txt GPL v3 License
* @copyright Copyright (c) 2017-2018
* @license Open Software License (OSL 3.0)
*/
namespace Pmclain\Stripe\Gateway\Http\Client;

Expand Down
8 changes: 4 additions & 4 deletions Gateway/Http/Client/TransactionSale.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* Pmclain_Stripe extension
* NOTICE OF LICENSE
*
* This source file is subject to the GPL v3 License
* This source file is subject to the OSL 3.0 License
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://www.gnu.org/licenses/gpl.txt
* https://opensource.org/licenses/osl-3.0.php
*
* @category Pmclain
* @package Pmclain_Stripe
* @copyright Copyright (c) 2017
* @license https://www.gnu.org/licenses/gpl.txt GPL v3 License
* @copyright Copyright (c) 2017-2018
* @license Open Software License (OSL 3.0)
*/
namespace Pmclain\Stripe\Gateway\Http\Client;

Expand Down
8 changes: 4 additions & 4 deletions Gateway/Http/Client/TransactionSubmitForSettlement.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* Pmclain_Stripe extension
* NOTICE OF LICENSE
*
* This source file is subject to the GPL v3 License
* This source file is subject to the OSL 3.0 License
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://www.gnu.org/licenses/gpl.txt
* https://opensource.org/licenses/osl-3.0.php
*
* @category Pmclain
* @package Pmclain_Stripe
* @copyright Copyright (c) 2017
* @license https://www.gnu.org/licenses/gpl.txt GPL v3 License
* @copyright Copyright (c) 2017-2018
* @license Open Software License (OSL 3.0)
*/
namespace Pmclain\Stripe\Gateway\Http\Client;

Expand Down
8 changes: 4 additions & 4 deletions Gateway/Http/Client/TransactionVoid.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* Pmclain_Stripe extension
* NOTICE OF LICENSE
*
* This source file is subject to the GPL v3 License
* This source file is subject to the OSL 3.0 License
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://www.gnu.org/licenses/gpl.txt
* https://opensource.org/licenses/osl-3.0.php
*
* @category Pmclain
* @package Pmclain_Stripe
* @copyright Copyright (c) 2017
* @license https://www.gnu.org/licenses/gpl.txt GPL v3 License
* @copyright Copyright (c) 2017-2018
* @license Open Software License (OSL 3.0)
*/
namespace Pmclain\Stripe\Gateway\Http\Client;

Expand Down
8 changes: 4 additions & 4 deletions Gateway/Http/TransferFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* Pmclain_Stripe extension
* NOTICE OF LICENSE
*
* This source file is subject to the GPL v3 License
* This source file is subject to the OSL 3.0 License
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://www.gnu.org/licenses/gpl.txt
* https://opensource.org/licenses/osl-3.0.php
*
* @category Pmclain
* @package Pmclain_Stripe
* @copyright Copyright (c) 2017
* @license https://www.gnu.org/licenses/gpl.txt GPL v3 License
* @copyright Copyright (c) 2017-2018
* @license Open Software License (OSL 3.0)
*/
namespace Pmclain\Stripe\Gateway\Http;

Expand Down
8 changes: 4 additions & 4 deletions Gateway/Request/AddressDataBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* Pmclain_Stripe extension
* NOTICE OF LICENSE
*
* This source file is subject to the GPL v3 License
* This source file is subject to the OSL 3.0 License
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://www.gnu.org/licenses/gpl.txt
* https://opensource.org/licenses/osl-3.0.php
*
* @category Pmclain
* @package Pmclain_Stripe
* @copyright Copyright (c) 2017
* @license https://www.gnu.org/licenses/gpl.txt GPL v3 License
* @copyright Copyright (c) 2017-2018
* @license Open Software License (OSL 3.0)
*/
namespace Pmclain\Stripe\Gateway\Request;

Expand Down
Loading

0 comments on commit fe56081

Please sign in to comment.