Skip to content

Commit

Permalink
Merge 4890cfa into 5171ab7
Browse files Browse the repository at this point in the history
  • Loading branch information
j0k3r committed Jun 21, 2019
2 parents 5171ab7 + 4890cfa commit 4be99c8
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 19 deletions.
18 changes: 11 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
language: php

cache:
directories:
- vendor

php:
- 5.4
- 5.5
- 5.6
- hhvm
- 7.0
- 7.1
- 7.2
- 7.3

before_script:
- composer require satooshi/php-coveralls:dev-master --dev --no-progress --prefer-source
- composer install -o --prefer-dist --no-interaction

script:
- mkdir -p build/logs
- phpunit --coverage-clover build/logs/clover.xml
- php vendor/bin/simple-phpunit -v --coverage-clover build/logs/clover.xml

after_script:
- php vendor/bin/coveralls -v
- php vendor/bin/php-coveralls -v
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build Status](https://travis-ci.org/mnapoli/PiwikTwigExtension.svg)](https://travis-ci.org/mnapoli/PiwikTwigExtension) [![Coverage Status](https://img.shields.io/coveralls/mnapoli/PiwikTwigExtension.svg)](https://coveralls.io/r/mnapoli/PiwikTwigExtension)

This library integrates [Piwik](http://piwik.org/) into [Twig](http://twig.sensiolabs.org/).
This library integrates [Piwik](http://piwik.org/) into [Twig](https://twig.symfony.com/).

## Installation

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
},
"require": {
"php": ">=5.4",
"twig/twig": "~1.10"
"twig/twig": "~2.10"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
"symfony/phpunit-bridge": "^4.2",
"php-coveralls/php-coveralls": "^2.0"
}
}
9 changes: 8 additions & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="./vendor/autoload.php">

<testsuites>
Expand All @@ -19,4 +18,12 @@
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>./src/</directory>
<exclude>
<directory>./tests</directory>
</exclude>
</whitelist>
</filter>
</phpunit>
4 changes: 2 additions & 2 deletions tests/ConfiguredExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Tests\PiwikTwigExtension;

use PiwikTwigExtension\PiwikTwigExtension;
use Twig_Test_IntegrationTestCase;
use Twig\Test\IntegrationTestCase;

class ConfiguredExtensionTest extends Twig_Test_IntegrationTestCase
class ConfiguredExtensionTest extends IntegrationTestCase
{
protected function getExtensions()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/DisabledExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Tests\PiwikTwigExtension;

use PiwikTwigExtension\PiwikTwigExtension;
use Twig_Test_IntegrationTestCase;
use Twig\Test\IntegrationTestCase;

class DisabledExtensionTest extends Twig_Test_IntegrationTestCase
class DisabledExtensionTest extends IntegrationTestCase
{
protected function getExtensions()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Calling "piwik" function without parameters, leading to an error
--DATA--
return array();
--EXPECT--
Twig_Error: Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("No Piwik host was configured or given to generate the tracker code") in "index.twig" at line 2 in "FunctionCallWithoutHost.test".
Twig\Error\Error: Twig\Error\RuntimeError: An exception has been thrown during the rendering of a template ("No Piwik host was configured or given to generate the tracker code") in "index.twig" at line 2.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Calling "piwik" function without the "site id" parameters, leading to an error
--DATA--
return array();
--EXPECT--
Twig_Error: Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("No Piwik site ID was configured or given to generate the tracker code") in "index.twig" at line 2 in "FunctionCallWithoutSiteId.test".
Twig\Error\Error: Twig\Error\RuntimeError: An exception has been thrown during the rendering of a template ("No Piwik site ID was configured or given to generate the tracker code") in "index.twig" at line 2.
4 changes: 2 additions & 2 deletions tests/NotConfiguredExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Tests\PiwikTwigExtension;

use PiwikTwigExtension\PiwikTwigExtension;
use Twig_Test_IntegrationTestCase;
use Twig\Test\IntegrationTestCase;

class NotConfiguredExtensionTest extends Twig_Test_IntegrationTestCase
class NotConfiguredExtensionTest extends IntegrationTestCase
{
protected function getExtensions()
{
Expand Down

0 comments on commit 4be99c8

Please sign in to comment.