Skip to content

Commit 1994a89

Browse files
committed
Added tests and actions to conform with baseline/platform changes
1 parent 33150c0 commit 1994a89

File tree

3 files changed

+49
-8
lines changed

3 files changed

+49
-8
lines changed

.github/workflows/php.yml

+32-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [ master ]
88

99
jobs:
10-
build_php_73:
10+
build_php_74:
1111

1212
runs-on: ubuntu-latest
1313

@@ -17,7 +17,7 @@ jobs:
1717
- name: Setup PHP with PECL extension
1818
uses: shivammathur/setup-php@v2
1919
with:
20-
php-version: '7.3'
20+
php-version: '7.4'
2121

2222
- name: Validate composer.json and composer.lock
2323
run: composer validate --strict
@@ -66,3 +66,33 @@ jobs:
6666

6767
- name: Run test suite
6868
run: composer run-script test
69+
70+
build_php_81:
71+
72+
runs-on: ubuntu-latest
73+
74+
steps:
75+
- uses: actions/checkout@v2
76+
77+
- name: Setup PHP with PECL extension
78+
uses: shivammathur/setup-php@v2
79+
with:
80+
php-version: '8.1'
81+
82+
- name: Validate composer.json and composer.lock
83+
run: composer validate --strict
84+
85+
- name: Cache Composer packages
86+
id: composer-cache
87+
uses: actions/cache@v2
88+
with:
89+
path: vendor
90+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
91+
restore-keys: |
92+
${{ runner.os }}-php-
93+
94+
- name: Install dependencies
95+
run: composer install --prefer-dist --no-progress
96+
97+
- name: Run test suite
98+
run: composer run-script test

tests/LaravelBitpayInvoiceTest.php

-6
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,4 @@ public function isInstanceOfBuyer()
2121
{
2222
$this->assertEquals(true, LaravelBitpay::Buyer() instanceof Buyer);
2323
}
24-
25-
/** @test */
26-
public function isInstanceOfRefund()
27-
{
28-
$this->assertEquals(true, LaravelBitpay::Refund() instanceof Refund);
29-
}
3024
}

tests/LaravelBitpayRefundTest.php

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
namespace Vrajroham\LaravelBitpay\Tests;
4+
5+
use BitPaySDK\Model\Invoice\Refund;
6+
use PHPUnit\Framework\TestCase;
7+
use Vrajroham\LaravelBitpay\LaravelBitpay;
8+
9+
10+
class LaravelBitpayRefundTest extends TestCase
11+
{
12+
/** @test */
13+
public function isInstanceOfRefund()
14+
{
15+
$this->assertEquals(true, LaravelBitpay::Refund() instanceof Refund);
16+
}
17+
}

0 commit comments

Comments
 (0)