Skip to content
This repository has been archived by the owner on Mar 14, 2020. It is now read-only.

Commit

Permalink
Merge pull request #54 from nicoschoenmaker/feature/fix-tests
Browse files Browse the repository at this point in the history
Fix Travis build
  • Loading branch information
henrikbjorn authored Jan 4, 2018
2 parents bc822a3 + a7fe704 commit 87c866d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 24 deletions.
27 changes: 8 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
language: php

php:
- 5.5
- 5.6
- 7.0
- 7.1
- nightly
- hhvm

env:
global:
- PATH="$HOME/.composer/vendor/bin:$PATH"

sudo: false

Expand All @@ -20,28 +15,22 @@ cache:
matrix:
fast_finish: true
include:
- php: 5.5
env: COMPOSER_FLAGS="--prefer-lowest"
- php: 5.6
env: SYMFONY_VERSION=2.3.*
env: COMPOSER_FLAGS="--prefer-lowest"
- php: 5.6
env: SYMFONY_VERSION=2.7.*
- php: 5.6
env: SYMFONY_VERSION=2.8.*@dev
env: SYMFONY_VERSION=2.8.*
- php: 5.6
env: SYMFONY_VERSION="3.0.x-dev as 2.8"
env: SYMFONY_VERSION="3.3.*"
- php: 5.6
env: SYMFONY_VERSION="3.4.*"
- php: 7.1
env: SYMFONY_VERSION="4.0.*"
allow_failures:
- php: nightly
- php: hhvm
- env: SYMFONY_VERSION=2.8.*@dev
- env: SYMFONY_VERSION="3.0.x-dev as 2.8"

before_script:
- composer selfupdate
- composer config -g github-oauth.github.com $GITHUB_OAUTH_TOKEN
- composer global require phpunit/phpunit:4.* --no-update
- composer global update --prefer-dist --no-interaction
- if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;
- composer update --prefer-dist --no-interaction $COMPOSER_FLAGS

script: make test
3 changes: 2 additions & 1 deletion Tests/GravatarApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
namespace Ornicar\GravatarBundle\Tests;

use Ornicar\GravatarBundle\GravatarApi;
use PHPUnit\Framework\TestCase;

class GravatarApiTest extends \PHPUnit_Framework_TestCase
class GravatarApiTest extends TestCase
{
public function testGravatarUrlWithDefaultOptions()
{
Expand Down
3 changes: 2 additions & 1 deletion Tests/Templating/Helper/GravatarHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

use Ornicar\GravatarBundle\GravatarApi;
use Ornicar\GravatarBundle\Templating\Helper\GravatarHelper;
use PHPUnit\Framework\TestCase;

class GravatarHelperTest extends \PHPUnit_Framework_TestCase
class GravatarHelperTest extends TestCase
{
protected $helper;

Expand Down
5 changes: 3 additions & 2 deletions Tests/Twig/GravatarExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

use Ornicar\GravatarBundle\Templating\Helper\GravatarHelperInterface;
use Ornicar\GravatarBundle\Twig\GravatarExtension;
use PHPUnit\Framework\TestCase;

class GravatarExtensionTest extends \PHPUnit_Framework_TestCase
class GravatarExtensionTest extends TestCase
{
/**
* @var GravatarHelperInterface
Expand All @@ -23,7 +24,7 @@ public function setUp()
$this->markTestSkipped('Twig_Extension cannot be found');
}

$this->helper = $this->getMock('Ornicar\GravatarBundle\Templating\Helper\GravatarHelperInterface');
$this->helper = $this->createMock('Ornicar\GravatarBundle\Templating\Helper\GravatarHelperInterface');
$this->extension = new GravatarExtension($this->helper);
}

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
}],
"require": {
"php": ">=5.3.0",
"symfony/framework-bundle" : "~3.0|~2.0"
"symfony/framework-bundle" : "~4.0|~3.0|~2.0",
"symfony/templating": "~4.0|~3.0|~2.0"
},
"require-dev": {
"twig/extensions": "1.0.*",
Expand Down

0 comments on commit 87c866d

Please sign in to comment.