File tree 5 files changed +106
-20
lines changed
5 files changed +106
-20
lines changed Original file line number Diff line number Diff line change
1
+ name : Unit Tests
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+ pull_request :
8
+ branches :
9
+ - " *"
10
+ schedule :
11
+ - cron : ' 0 0 * * *'
12
+
13
+ jobs :
14
+ php-tests :
15
+ runs-on : ubuntu-latest
16
+ timeout-minutes : 15
17
+ env :
18
+ COMPOSER_NO_INTERACTION : 1
19
+
20
+ strategy :
21
+ matrix :
22
+ php : [7.4, 7.3, 7.2]
23
+ dependency-version : [prefer-lowest, prefer-stable]
24
+
25
+ name : P${{ matrix.php }} - ${{ matrix.dependency-version }}
26
+
27
+ steps :
28
+ - name : Checkout code
29
+ uses : actions/checkout@v2
30
+
31
+ - name : Setup PHP
32
+ uses : shivammathur/setup-php@v2
33
+ with :
34
+ php-version : ${{ matrix.php }}
35
+ coverage : none
36
+ tools : composer
37
+
38
+ - name : Install dependencies
39
+ run : |
40
+ composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress
41
+
42
+ - name : Execute Unit Tests
43
+ run : composer test
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 28
28
"require-dev" : {
29
29
"omnipay/tests" : " ^3"
30
30
},
31
+ "autoload-dev" : {
32
+ "psr-4" : { "Omnipay\\ Tests\\ " : " tests" }
33
+ },
31
34
"extra" : {
32
35
"branch-alias" : {
33
36
"dev-master" : " 3.0.x-dev"
34
37
}
35
38
},
39
+ "scripts" : {
40
+ "test" : " phpunit"
41
+ },
36
42
"prefer-stable" : true
37
43
}
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <phpunit backupGlobals =" false"
3
+ backupStaticAttributes =" false"
4
+ bootstrap =" vendor/autoload.php"
5
+ colors =" true"
6
+ convertErrorsToExceptions =" true"
7
+ convertNoticesToExceptions =" true"
8
+ convertWarningsToExceptions =" true"
9
+ processIsolation =" false"
10
+ stopOnFailure =" false"
11
+ syntaxCheck =" false" >
12
+ <testsuites >
13
+ <testsuite name =" Omnipay Test Suite" >
14
+ <directory >./tests/</directory >
15
+ </testsuite >
16
+ </testsuites >
17
+ <filter >
18
+ <whitelist >
19
+ <directory >./src</directory >
20
+ </whitelist >
21
+ </filter >
22
+ </phpunit >
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Omnipay \Tests ;
4
+
5
+ use Omnipay \Common \Http \Client ;
6
+ use Omnipay \Omnipay ;
7
+
8
+ class OmnipayTest extends TestCase
9
+ {
10
+ public function tearDown ()
11
+ {
12
+ Omnipay::setFactory (null );
13
+
14
+ parent ::tearDown ();
15
+ }
16
+
17
+ public function testGetFactory ()
18
+ {
19
+ Omnipay::setFactory (null );
20
+
21
+ $ factory = Omnipay::getFactory ();
22
+ $ this ->assertInstanceOf ('Omnipay\Common\GatewayFactory ' , $ factory );
23
+ }
24
+
25
+
26
+ /**
27
+ * Verify a new Client instance can be instantiated
28
+ */
29
+ public function testNewClient ()
30
+ {
31
+ $ client = new Client ();
32
+
33
+ $ this ->assertInstanceOf ('Omnipay\Common\Http\Client ' , $ client );
34
+ }
35
+ }
You can’t perform that action at this time.
0 commit comments