Skip to content

Commit

Permalink
Merge pull request #886 from robfrawley/feature-test-deprecations-usi…
Browse files Browse the repository at this point in the history
…ng-phpunit-bridge

[Tests] Assert expected deprecation using symfony/phpunit-bridge
  • Loading branch information
robfrawley authored Mar 1, 2017
2 parents 2e4deaa + 2c0000f commit 03e550d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---

sudo: false

language: php

php:
Expand All @@ -11,14 +13,14 @@ php:
- 7.1
- hhvm

sudo: false

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

env:
- SYMFONY_VERSION=2.8.x
global:
- SYMFONY_VERSION=2.8.x
- SYMFONY_DEPRECATIONS_HELPER=weak

matrix:
include:
Expand Down Expand Up @@ -58,7 +60,7 @@ install:
- travis_retry composer update $COMPOSER_FLAGS

script:
- SYMFONY_DEPRECATIONS_HELPER=weak ./bin/phpunit -vvv
- bin/simple-phpunit -vvv || bin/phpunit -vvv

after_script:
- if [ "${TRAVIS_PHP_VERSION}" != "5.3" ]; then bin/coveralls -vvv; fi;
Expand Down
5 changes: 4 additions & 1 deletion Tests/Binary/Loader/FileSystemLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,13 @@ public function testLoad($root, $path)
/**
* @dataProvider provideLoadCases
*
* @group legacy
* @expectedDeprecation Method %s() will have a forth `LocatorInterface $locator` argument in version 2.0. Not defining it is deprecated since version 1.7.2
*
* @param string $root
* @param string $path
*/
public function testDeprecatedConstruction($root, $path)
public function testLegacyConstruction($root, $path)
{
$loader = new FileSystemLoader(
MimeTypeGuesser::getInstance(),
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"doctrine/orm": "~2.3",
"ext-gd": "*",
"friendsofphp/php-cs-fixer": "~2.0",
"phpunit/phpunit": "~4.3",
"phpunit/phpunit": "~4.3|~5.0",
"psr/log": "~1.0",
"satooshi/php-coveralls": "~1.0",
"sllh/php-cs-fixer-styleci-bridge": "~2.1",
Expand Down

0 comments on commit 03e550d

Please sign in to comment.