-
Notifications
You must be signed in to change notification settings - Fork 1
Update stored cards mechanisms, add testing scaffolding #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| name: "Build tests" | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - "main" | ||
|
|
||
| jobs: | ||
| phpunit: | ||
| name: "PHPUnit tests" | ||
|
|
||
| runs-on: "ubuntu-latest" | ||
|
|
||
| strategy: | ||
| matrix: | ||
| dependencies: | ||
| - "highest" | ||
| php-version: | ||
| - "7.2" | ||
| - "7.3" | ||
| - "7.4" | ||
| - "8.0" | ||
| - "8.1" | ||
| - "8.2" | ||
| - "8.3" | ||
| - "8.4" | ||
|
|
||
| include: | ||
| - php-version: '7.2' | ||
| dependencies: "lowest" | ||
|
|
||
| steps: | ||
| - name: "Checkout" | ||
| uses: "actions/checkout@v4" | ||
|
|
||
| - name: "Install PHP" | ||
| uses: "shivammathur/setup-php@v2" | ||
| with: | ||
| coverage: "pcov" | ||
| php-version: "${{ matrix.php-version }}" | ||
| ini-values: memory_limit=-1 | ||
| tools: composer:v2 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| # Fixes any pubkeys failure (add a `composer diagnose` step to debug if necessary) | ||
| - name: "Composer force self-update" | ||
| run: "composer self-update" | ||
|
|
||
| - name: "Install lowest dependencies" | ||
| if: ${{ matrix.dependencies == 'lowest' }} | ||
| run: "composer update --prefer-lowest --no-interaction --no-progress" | ||
|
|
||
| - name: "Install highest dependencies" | ||
| if: ${{ matrix.dependencies == 'highest' }} | ||
| run: "composer update --no-interaction --no-progress" | ||
|
|
||
| - name: "Tests (PHPUnit 9)" | ||
| if: ${{ matrix.php-version <= '8.0' }} | ||
| run: "vendor/bin/phpunit --configuration phpunit9.xml.dist" | ||
|
|
||
| - name: "Tests (PHPUnit 10+)" | ||
| if: ${{ matrix.php-version >= '8.1' }} | ||
| run: "vendor/bin/phpunit" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| /vendor | ||
| composer.lock | ||
| composer.phar | ||
| phpunit.xml | ||
| /.phpunit.result.cache | ||
| /build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Contributing Guidelines | ||
|
|
||
| * Fork the project. | ||
| * Make your feature addition or bug fix. | ||
| * Add tests for it. This is important so I don't break it in a future version unintentionally. | ||
| * Commit just the modifications, do not mess with the composer.json or CHANGELOG.md files. | ||
| * Ensure your code is nicely formatted in the [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) | ||
| style and that all tests pass. | ||
| * Send the pull request. | ||
| * Check that the CI build passed. If not, rinse and repeat. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,10 @@ | |
| "merchant", | ||
| "omnipay", | ||
| "pay", | ||
| "payment" | ||
| "payment", | ||
| "hosted", | ||
| "checkout", | ||
| "redirect" | ||
| ], | ||
| "homepage": "https://github.com/PatronBase/omnipay-windcave-hpp", | ||
| "license": "MIT", | ||
|
|
@@ -22,6 +25,10 @@ | |
| { | ||
| "name": "Aimal Muhammad", | ||
| "email": "[email protected]" | ||
| }, | ||
| { | ||
| "name": "Leith Caldwell", | ||
| "email": "[email protected]" | ||
| } | ||
| ], | ||
| "autoload": { | ||
|
|
@@ -35,17 +42,28 @@ | |
| } | ||
| }, | ||
| "require": { | ||
| "omnipay/common": "^3", | ||
| "php": "^7||^8" | ||
| "omnipay/common": "^3.1", | ||
| "php": "^7.2||^8" | ||
| }, | ||
| "require-dev": { | ||
| "omnipay/tests": "^3", | ||
| "squizlabs/php_codesniffer": "^3.5" | ||
| "omnipay/tests": "^4.2", | ||
| "squizlabs/php_codesniffer": "^3.5", | ||
| "http-interop/http-factory-guzzle": "^1.1" | ||
| }, | ||
| "scripts": { | ||
| "test": "phpunit", | ||
| "check-style": "phpcs -p --standard=PSR2 src/", | ||
| "fix-style": "phpcbf -p --standard=PSR2 src/" | ||
| }, | ||
| "extra": { | ||
| "branch-alias": { | ||
| "dev-master": "1.0.x-dev" | ||
| "dev-master": "1.1.x-dev" | ||
| } | ||
| }, | ||
| "prefer-stable": true | ||
| } | ||
| "prefer-stable": true, | ||
| "config": { | ||
| "allow-plugins": { | ||
| "php-http/discovery": false | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" | ||
| bootstrap="vendor/autoload.php" | ||
| backupGlobals="false" | ||
| backupStaticProperties="false" | ||
| colors="true" | ||
| processIsolation="false" | ||
| stopOnFailure="false"> | ||
| <coverage> | ||
| <report> | ||
| <clover outputFile="build/logs/clover.xml"/> | ||
| <html outputDirectory="build/coverage"/> | ||
| <text outputFile="build/coverage.txt"/> | ||
| </report> | ||
| </coverage> | ||
| <source restrictDeprecations="true" restrictNotices="true" restrictWarnings="true"> | ||
| <include> | ||
| <directory suffix=".php">src/</directory> | ||
| </include> | ||
| </source> | ||
| <testsuites> | ||
| <testsuite name="Omnipay Test Suite"> | ||
| <directory>tests</directory> | ||
| </testsuite> | ||
| </testsuites> | ||
| <logging> | ||
| <junit outputFile="build/report.junit.xml"/> | ||
| </logging> | ||
| </phpunit> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd" | ||
| bootstrap="vendor/autoload.php" | ||
| backupGlobals="false" | ||
| backupStaticAttributes="false" | ||
| colors="true" | ||
| verbose="true" | ||
| convertErrorsToExceptions="true" | ||
| convertNoticesToExceptions="true" | ||
| convertWarningsToExceptions="true" | ||
| processIsolation="false" | ||
| stopOnFailure="false"> | ||
| <coverage> | ||
| <include> | ||
| <directory suffix=".php">src/</directory> | ||
| </include> | ||
| <report> | ||
| <clover outputFile="build/logs/clover.xml"/> | ||
| <html outputDirectory="build/coverage"/> | ||
| <text outputFile="build/coverage.txt"/> | ||
| </report> | ||
| </coverage> | ||
| <testsuites> | ||
| <testsuite name="Omnipay Test Suite"> | ||
| <directory>tests</directory> | ||
| </testsuite> | ||
| </testsuites> | ||
| <logging> | ||
| <junit outputFile="build/report.junit.xml"/> | ||
| </logging> | ||
| </phpunit> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| <?php | ||
|
|
||
| namespace Omnipay\WindcaveHpp; | ||
|
|
||
| use Omnipay\Tests\GatewayTestCase; | ||
|
|
||
| class GatewayTest extends GatewayTestCase | ||
| { | ||
| /** @var array */ | ||
| protected $options; | ||
|
|
||
| public function setUp(): void | ||
| { | ||
| parent::setUp(); | ||
|
|
||
| $this->gateway = new Gateway($this->getHttpClient(), $this->getHttpRequest()); | ||
|
|
||
| $this->options = [ | ||
| 'amount' => '1.45', | ||
| 'apiUsername' => 'Test_Merchant', | ||
| 'apiKey' => 'ABCDEF1234567890ABCDEF1234567890ABCDEF1234567890ABCDEF1234567890', | ||
| 'currency' => 'NZD', | ||
| 'cancelUrl' => 'https://www.example.com/cancel', | ||
| 'notifyUrl' => 'https://www.example.com/notify', | ||
| 'returnUrl' => 'https://www.example.com/return', | ||
| 'transactionId' => '123abc', | ||
| 'testMode' => true, | ||
| ]; | ||
| } | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.