File tree Expand file tree Collapse file tree 3 files changed +36
-3
lines changed Expand file tree Collapse file tree 3 files changed +36
-3
lines changed Original file line number Diff line number Diff line change 3535 run : vendor/bin/phpunit --verbose --coverage-text --coverage-clover=coverage.xml
3636
3737 - name : Code Climate Test Reporter
38- if : matrix.coverage
3938 uses : aktions/codeclimate-test-reporter@v1
4039 with :
4140 codeclimate-test-reporter-id : ${{ secrets.CC_TEST_REPORTER_ID }}
4544 continue-on-error : true
4645
4746 - name : Coverage
48- if : matrix.coverage
4947 run : bash <(curl -s https://codecov.io/bash)
5048 env :
5149 PHP_VERSION : ${{ matrix.php }}
Original file line number Diff line number Diff line change 22[ ![ Latest Stable Version] ( https://poser.pugx.org/pug-php/pug-symfony/v/stable.png )] ( https://packagist.org/packages/pug-php/pug-symfony )
33[ ![ GitHub Actions] ( https://github.com/pug-php/pug-symfony/workflows/Tests/badge.svg )] ( https://github.com/pug-php/pug-symfony/actions )
44[ ![ 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 )
66
77[ Pug template] ( https://phug-lang.com/ ) engine for Symfony
88
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