Skip to content

Commit

Permalink
Merge pull request #119 from WouterJ/patch-1
Browse files Browse the repository at this point in the history
Test against different Symfony versions
  • Loading branch information
akovalyov committed Nov 11, 2015
2 parents 2aa510c + 45199be commit efda38a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 14 deletions.
22 changes: 20 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
language: php

sudo: false

cache:
directories:
- $HOME/.composer/cache

php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm

matrix:
include:
- php: 5.6
env: SYMFONY_VERSION="2.3.*"
- php: 5.6
env: SYMFONY_VERSION="2.8.*@dev symfony/phpunit-bridge:~2.7"
- php: 5.6
env: SYMFONY_VERSION="3.0.*@dev"
fast_finish: true

before_install: if [[ "$SYMFONY_VERSION" != "" ]]; then composer require --no-update symfony/symfony:${SYMFONY_VERSION}; fi

before_script:
- composer update --dev
install: composer update --prefer-dist

script: phpunit
2 changes: 1 addition & 1 deletion Snappy/LoggableGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Knp\Bundle\SnappyBundle\Snappy;

use Knp\Snappy\GeneratorInterface;
use Symfony\Component\HttpKernel\Log\LoggerInterface;
use Psr\Log\LoggerInterface;

/**
* Wraps a GeneratorInterface instance to log the media generations using the
Expand Down
14 changes: 7 additions & 7 deletions Tests/Snappy/LoggableGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function testGenerate()
)
;

$logger = $this->getMock('Symfony\Component\HttpKernel\Log\LoggerInterface');
$logger = $this->getMock('Psr\Log\LoggerInterface');
$logger
->expects($this->once())
->method('debug')
Expand All @@ -45,7 +45,7 @@ public function testGenerateFromHtml()
)
;

$logger = $this->getMock('Symfony\Component\HttpKernel\Log\LoggerInterface');
$logger = $this->getMock('Psr\Log\LoggerInterface');
$logger
->expects($this->once())
->method('debug')
Expand All @@ -70,7 +70,7 @@ public function testGenerateFromHtmlWithHtmlArray()
)
;

$logger = $this->getMock('Symfony\Component\HttpKernel\Log\LoggerInterface');
$logger = $this->getMock('Psr\Log\LoggerInterface');
$logger
->expects($this->once())
->method('debug')
Expand All @@ -93,7 +93,7 @@ public function testOutput()
)
;

$logger = $this->getMock('Symfony\Component\HttpKernel\Log\LoggerInterface');
$logger = $this->getMock('Psr\Log\LoggerInterface');
$logger
->expects($this->once())
->method('debug')
Expand All @@ -116,7 +116,7 @@ public function testOutputFromHtml()
)
;

$logger = $this->getMock('Symfony\Component\HttpKernel\Log\LoggerInterface');
$logger = $this->getMock('Psr\Log\LoggerInterface');
$logger
->expects($this->once())
->method('debug')
Expand All @@ -139,7 +139,7 @@ public function testOutputFromHtmlWithHtmlArray()
)
;

$logger = $this->getMock('Symfony\Component\HttpKernel\Log\LoggerInterface');
$logger = $this->getMock('Psr\Log\LoggerInterface');
$logger
->expects($this->once())
->method('debug')
Expand Down Expand Up @@ -170,7 +170,7 @@ public function testSetOption()
)
;

$logger = $this->getMock('Symfony\Component\HttpKernel\Log\LoggerInterface');
$logger = $this->getMock('Psr\Log\LoggerInterface');
$logger
->expects($this->at(0))
->method('debug')
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@

"require": {
"php": ">=5.3.2",
"symfony/framework-bundle": ">=2.0.0",
"symfony/finder": ">=2.0.0",
"symfony/validator": ">=2.0.0",
"knplabs/knp-snappy": "*"
"symfony/framework-bundle": "~2.3|~3.0",
"symfony/finder": "~2.3|~3.0",
"symfony/validator": "~2.3|~3.0",
"knplabs/knp-snappy": "~0.1"
},

"autoload": {
Expand Down

0 comments on commit efda38a

Please sign in to comment.