Skip to content

Commit

Permalink
Merge pull request cardgate#13 from RichardCardGate/master
Browse files Browse the repository at this point in the history
Travis building files.
  • Loading branch information
cardgate authored Feb 5, 2020
2 parents caef849 + 06a7686 commit c8b9315
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,10 @@ payment/*
!copyfiles.php
!README.md
!README_DE.md
!README_NL.md
!README_NL.md
!.travis.yml
!composer.json
!phpunit.xml.dist
!tests
!tests/bootstrap.php
!tests/phpunit.xml
26 changes: 26 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
language: php

php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4

# This triggers builds to run on the new TravisCI infrastructure.
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false

## Cache composer
cache:
directories:
- $HOME/.composer/cache

install:
- travis_retry composer install --no-interaction
- composer require --dev "phpunit/phpunit"

script:
- composer validate --strict
- vendor/bin/phpunit -c tests/phpunit.xml
15 changes: 15 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "cardgate/x-cart",
"type": "library",
"description": "CardGate payment processing module for X-Cart",
"keywords": [
"x-cart",
"cardgate",
"payment"
],
"homepage": "https://www.cardgate.com",
"license": "MIT",
"autoload": {
"psr-4": { "Cardgate\\x-cart\\" : "" }
}
}
22 changes: 22 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
<phpunit
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="tests/bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false">
<php>
<ini name="display_errors" value="stderr" />
<ini name="error_log" value="/dev/null" />
</php>
<testsuites>
<testsuite name="Unit tests">
<directory>./tests</directory>
</testsuite>
</testsuites>
</phpunit>
Empty file added tests/bootstrap.php
Empty file.
8 changes: 8 additions & 0 deletions tests/phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<phpunit bootstrap="bootstrap.php" backupStaticAttributes="false" colors="true">
<testsuites>
<testsuite name="CardGate X-Cart">
<directory>.</directory>
</testsuite>
</testsuites>
</phpunit>

0 comments on commit c8b9315

Please sign in to comment.