File tree 5 files changed +56
-45
lines changed
5 files changed +56
-45
lines changed Original file line number Diff line number Diff line change
1
+ name : PHPUnit tests
2
+
3
+ on :
4
+ push :
5
+ branches : [ master ]
6
+ pull_request :
7
+ branches : [ master ]
8
+
9
+ jobs :
10
+ php-version :
11
+
12
+ runs-on : ubuntu-latest
13
+
14
+ strategy :
15
+ fail-fast : false
16
+ matrix :
17
+ php-version :
18
+ - " 5.4"
19
+ - " 5.5"
20
+ - " 5.6"
21
+ - " 7.0"
22
+ - " 7.1"
23
+ - " 7.2"
24
+ - " 7.3"
25
+ - " 7.4"
26
+ - " 8.0"
27
+
28
+ steps :
29
+
30
+ - uses : actions/checkout@v2
31
+
32
+ - name : Install PHP
33
+ uses : " shivammathur/setup-php@v2"
34
+ with :
35
+ php-version : " ${{ matrix.php-version }}"
36
+ coverage : " none"
37
+ ini-values : " zend.assertions=1"
38
+
39
+ - name : Install Composer dependencies
40
+ run : composer install --no-progress --ansi
41
+
42
+ - name : Run tests ${{ matrix.php-version }}
43
+ run : SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1 bin/simple-phpunit --color=always
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
# PHP Font Lib
2
2
3
- [ ![ Build Status] ( https://travis-ci.org/PhenX/php-font-lib.svg?branch=master )] ( https://travis-ci.org/PhenX/php-font-lib )
4
-
5
-
6
3
This library can be used to:
7
4
* Read TrueType, OpenType (with TrueType glyphs), WOFF font files
8
5
* Extract basic info (name, style, etc)
Original file line number Diff line number Diff line change 16
16
}
17
17
},
18
18
"config" : {
19
- "bin-dir" : " bin"
19
+ "bin-dir" : " bin"
20
20
},
21
21
"require-dev" : {
22
- "phpunit /phpunit" : " ^4.8.35 || ^5 || ^6 || ^7 "
22
+ "symfony /phpunit-bridge" : " ^3 || ^4 || ^5 "
23
23
}
24
24
}
Original file line number Diff line number Diff line change 7
7
8
8
class FontTest extends TestCase
9
9
{
10
- /**
11
- * @expectedException \Fontlib\Exception\FontNotFoundException
12
- */
13
10
public function testLoadFileNotFound ()
14
11
{
15
- Font::load ('non-existing/font.ttf ' );
12
+ // @todo when PHP 5.4 support is dropped, uncomment line below and drop
13
+ // the try...catch block.
14
+ // $this->expectException('\Fontlib\Exception\FontNotFoundException');
15
+ try {
16
+ Font::load ('non-existing/font.ttf ' );
17
+ $ this ->fail ('Load should have failed. ' );
18
+ }
19
+ catch (\Fontlib \Exception \FontNotFoundException $ e ) {
20
+ // Avoid throwing a risky test error.
21
+ $ this ->assertTrue (true );
22
+ }
16
23
}
17
24
18
25
public function testLoadTTFFontSuccessfully ()
You can’t perform that action at this time.
0 commit comments