Skip to content

Commit

Permalink
Added tests and actions to conform with baseline/platform changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstewartja committed Dec 18, 2022
1 parent 33150c0 commit 1994a89
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 8 deletions.
34 changes: 32 additions & 2 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ master ]

jobs:
build_php_73:
build_php_74:

runs-on: ubuntu-latest

Expand All @@ -17,7 +17,7 @@ jobs:
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
php-version: '7.4'

- name: Validate composer.json and composer.lock
run: composer validate --strict
Expand Down Expand Up @@ -66,3 +66,33 @@ jobs:

- name: Run test suite
run: composer run-script test

build_php_81:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'

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

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
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
6 changes: 0 additions & 6 deletions tests/LaravelBitpayInvoiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,4 @@ public function isInstanceOfBuyer()
{
$this->assertEquals(true, LaravelBitpay::Buyer() instanceof Buyer);
}

/** @test */
public function isInstanceOfRefund()
{
$this->assertEquals(true, LaravelBitpay::Refund() instanceof Refund);
}
}
17 changes: 17 additions & 0 deletions tests/LaravelBitpayRefundTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace Vrajroham\LaravelBitpay\Tests;

use BitPaySDK\Model\Invoice\Refund;
use PHPUnit\Framework\TestCase;
use Vrajroham\LaravelBitpay\LaravelBitpay;


class LaravelBitpayRefundTest extends TestCase
{
/** @test */
public function isInstanceOfRefund()
{
$this->assertEquals(true, LaravelBitpay::Refund() instanceof Refund);
}
}

0 comments on commit 1994a89

Please sign in to comment.