diff --git a/.travis.yml b/.travis.yml index 39e9ef4..d7e62ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,14 +30,17 @@ matrix: dist: bionic - php: 7.4 dist: bionic + - php: nightly + dist: bionic install: - - if [[ $setup = 'basic' ]]; then travis_retry composer install --prefer-dist --no-interaction; fi - - if [[ $setup = 'lowest' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable; fi + - if [[ $setup = 'basic' && "$TRAVIS_PHP_VERSION" != "nightly" ]]; then travis_retry composer install --prefer-dist --no-interaction; fi + - if [[ $setup = 'lowest' && "$TRAVIS_PHP_VERSION" != "nightly" ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable; fi + - if [[ "$TRAVIS_PHP_VERSION" = "nightly" ]]; then travis_retry composer install --prefer-dist --no-interaction --ignore-platform-reqs; fi script: - vendor/bin/phpunit --verbose --coverage-clover=coverage.clover after_success: - - if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi - - if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi + - if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi + - if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi diff --git a/composer.json b/composer.json index bb47c01..e987a65 100644 --- a/composer.json +++ b/composer.json @@ -12,13 +12,13 @@ } ], "require": { - "php": "^5.5 || ^7.0", + "php": "^5.5 || ^7.0 || ^8.0", "ext-dom": "*", "ext-libxml": "*", "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index da5f589..1b7ae50 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -8,7 +8,6 @@ convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" - syntaxCheck="false" > diff --git a/tests/CssToInlineStylesTest.php b/tests/CssToInlineStylesTest.php index d61df74..4fbd1b3 100644 --- a/tests/CssToInlineStylesTest.php +++ b/tests/CssToInlineStylesTest.php @@ -13,12 +13,18 @@ class CssToInlineStylesTest extends TestCase */ protected $cssToInlineStyles; - public function setUp() + /** + * @before + */ + protected function prepare() { $this->cssToInlineStyles = new CssToInlineStyles(); } - public function tearDown() + /** + * @after + */ + protected function clear() { $this->cssToInlineStyles = null; }