File tree 3 files changed +36
-3
lines changed
3 files changed +36
-3
lines changed Original file line number Diff line number Diff line change 35
35
run : vendor/bin/phpunit --verbose --coverage-text --coverage-clover=coverage.xml
36
36
37
37
- name : Code Climate Test Reporter
38
- if : matrix.coverage
39
38
uses : aktions/codeclimate-test-reporter@v1
40
39
with :
41
40
codeclimate-test-reporter-id : ${{ secrets.CC_TEST_REPORTER_ID }}
45
44
continue-on-error : true
46
45
47
46
- name : Coverage
48
- if : matrix.coverage
49
47
run : bash <(curl -s https://codecov.io/bash)
50
48
env :
51
49
PHP_VERSION : ${{ matrix.php }}
Original file line number Diff line number Diff line change 2
2
[ ![ Latest Stable Version] ( https://poser.pugx.org/pug-php/pug-symfony/v/stable.png )] ( https://packagist.org/packages/pug-php/pug-symfony )
3
3
[ ![ GitHub Actions] ( https://github.com/pug-php/pug-symfony/workflows/Tests/badge.svg )] ( https://github.com/pug-php/pug-symfony/actions )
4
4
[ ![ StyleCI] ( https://styleci.io/repos/61784988/shield?style=flat )] ( https://styleci.io/repos/61784988 )
5
- [ ![ Test Coverage] ( https://codeclimate.com/github /pug-php/pug-symfony/badges/coverage .svg )] ( https://codecov.io/github/pug-php/pug-symfony?branch=master )
5
+ [ ![ Test Coverage] ( https://codecov.io/gh /pug-php/pug-symfony/branch/master/graph/badge .svg?token=yzjEnZzRNm )] ( https://codecov.io/github/pug-php/pug-symfony?branch=master )
6
6
7
7
[ Pug template] ( https://phug-lang.com/ ) engine for Symfony
8
8
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Pug \Tests ;
4
+
5
+ use Pug \Twig \Environment ;
6
+ use Twig \Error \RuntimeError ;
7
+ use Twig \Loader \ArrayLoader ;
8
+
9
+ class EnvironmentTest extends AbstractTestCase
10
+ {
11
+ /**
12
+ * @throws RuntimeError
13
+ */
14
+ public function testWithoutRoot ()
15
+ {
16
+ self ::expectException (RuntimeError::class);
17
+ self ::expectExceptionMessage ('Unable to load the "I-surely-does-not-exist" runtime. ' );
18
+
19
+ $ env = new Environment (new ArrayLoader ());
20
+ $ env ->getRuntime ('I-surely-does-not-exist ' );
21
+ }
22
+
23
+ /**
24
+ * @throws RuntimeError
25
+ */
26
+ public function testWithRoot ()
27
+ {
28
+ self ::expectException (RuntimeError::class);
29
+ self ::expectExceptionMessage ('Unable to load the "I-surely-does-not-exist" runtime. ' );
30
+
31
+ $ env = new Environment (new ArrayLoader ());
32
+ $ env ->rootEnv = new Environment (new ArrayLoader ());
33
+ $ env ->getRuntime ('I-surely-does-not-exist ' );
34
+ }
35
+ }
You can’t perform that action at this time.
0 commit comments