Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
receiver1 committed Oct 4, 2024
1 parent 60714d1 commit f81a6c5
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 3 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/php.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: PHP Composer

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run test suite
run: composer run-script test
1 change: 1 addition & 0 deletions .phpunit.result.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":1,"defects":{"Omnipay\\PZMPay\\GatewayTest::testDefaultParametersHaveMatchingMethods":5,"Omnipay\\PZMPay\\GatewayTest::testPurchaseParameters":5},"times":{"Omnipay\\PZMPay\\GatewayTest::testGetNameNotEmpty":0.022,"Omnipay\\PZMPay\\GatewayTest::testGetShortNameNotEmpty":0,"Omnipay\\PZMPay\\GatewayTest::testGetDefaultParametersReturnsArray":0,"Omnipay\\PZMPay\\GatewayTest::testDefaultParametersHaveMatchingMethods":0,"Omnipay\\PZMPay\\GatewayTest::testTestMode":0,"Omnipay\\PZMPay\\GatewayTest::testCurrency":0,"Omnipay\\PZMPay\\GatewayTest::testSupportsAuthorize":0,"Omnipay\\PZMPay\\GatewayTest::testSupportsCompleteAuthorize":0,"Omnipay\\PZMPay\\GatewayTest::testSupportsCapture":0,"Omnipay\\PZMPay\\GatewayTest::testSupportsPurchase":0.002,"Omnipay\\PZMPay\\GatewayTest::testSupportsCompletePurchase":0,"Omnipay\\PZMPay\\GatewayTest::testSupportsRefund":0,"Omnipay\\PZMPay\\GatewayTest::testSupportsVoid":0,"Omnipay\\PZMPay\\GatewayTest::testSupportsCreateCard":0,"Omnipay\\PZMPay\\GatewayTest::testSupportsDeleteCard":0,"Omnipay\\PZMPay\\GatewayTest::testSupportsUpdateCard":0,"Omnipay\\PZMPay\\GatewayTest::testAuthorizeParameters":0,"Omnipay\\PZMPay\\GatewayTest::testCompleteAuthorizeParameters":0,"Omnipay\\PZMPay\\GatewayTest::testCaptureParameters":0,"Omnipay\\PZMPay\\GatewayTest::testPurchaseParameters":0,"Omnipay\\PZMPay\\GatewayTest::testCompletePurchaseParameters":0,"Omnipay\\PZMPay\\GatewayTest::testRefundParameters":0,"Omnipay\\PZMPay\\GatewayTest::testVoidParameters":0,"Omnipay\\PZMPay\\GatewayTest::testCreateCardParameters":0,"Omnipay\\PZMPay\\GatewayTest::testDeleteCardParameters":0,"Omnipay\\PZMPay\\GatewayTest::testUpdateCardParameters":0}}
10 changes: 9 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,19 @@
"require-dev": {
"omnipay/tests": "^4.1"
},
"scripts": {
"test": "vendor/bin/phpunit"
},
"autoload": {
"psr-4": {
"Omnipay\\PZMPay\\": "src"
}
},
"minimum-stability": "dev",
"prefer-stable": true
"prefer-stable": true,
"config": {
"allow-plugins": {
"php-http/discovery": false
}
}
}
3 changes: 1 addition & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false">
stopOnFailure="false">
<php>
<ini name="display_errors" value="stderr" />
<ini name="error_log" value="/dev/null" />
Expand Down

0 comments on commit f81a6c5

Please sign in to comment.