From 691e36b1f241e7000fa36d176a2b13de4820b64c Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Sat, 11 Nov 2017 00:56:03 -0200 Subject: [PATCH 1/3] Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase --- composer.json | 3 +++ phpunit.xml.dist | 2 +- test/CommonMarkTest.php | 5 ++++- test/ParsedownTest.php | 4 +++- test/bootstrap.php | 4 ---- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 28145af..b7f8aea 100644 --- a/composer.json +++ b/composer.json @@ -15,6 +15,9 @@ "require": { "php": ">=5.3.0" }, + "require-dev": { + "phpunit/phpunit": "^4.8.35" + }, "autoload": { "psr-0": {"Parsedown": ""} } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index b2d5e9d..dd9da22 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -5,4 +5,4 @@ test/ParsedownTest.php - \ No newline at end of file + diff --git a/test/CommonMarkTest.php b/test/CommonMarkTest.php index 9b8d116..7111f0b 100644 --- a/test/CommonMarkTest.php +++ b/test/CommonMarkTest.php @@ -8,7 +8,10 @@ * @link http://commonmark.org/ CommonMark * @link http://git.io/8WtRvQ JavaScript test runner */ -class CommonMarkTest extends PHPUnit_Framework_TestCase + +use PHPUnit\Framework\TestCase; + +class CommonMarkTest extends TestCase { const SPEC_URL = 'https://raw.githubusercontent.com/jgm/stmd/master/spec.txt'; diff --git a/test/ParsedownTest.php b/test/ParsedownTest.php index 323dace..3b4c7d9 100644 --- a/test/ParsedownTest.php +++ b/test/ParsedownTest.php @@ -1,6 +1,8 @@ Date: Sat, 11 Nov 2017 01:02:11 -0200 Subject: [PATCH 2/3] Make Travis CI use installed PHPUnit version, not global one --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6799ce6..58831c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,5 +14,10 @@ matrix: fast_finish: true allow_failures: - php: nightly + - php: 5.3 -sudo: false \ No newline at end of file +before_script: + - composer install --prefer-dist --no-interaction --no-progress + +script: + - vendor/bin/phpunit From 09827f542c09ef729e34a01ff9eafa1c832f7559 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Tue, 14 Nov 2017 15:19:24 -0200 Subject: [PATCH 3/3] Rewrite Travis CI --- .travis.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 58831c9..cfb4d8d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,24 @@ language: php -php: - - 7.1 - - 7.0 - - 5.6 - - 5.5 - - 5.4 - - 5.3 - - hhvm - - nightly +dist: trusty +sudo: false matrix: + include: + - php: 5.3 + dist: precise + - php: 5.4 + - php: 5.5 + - php: 5.6 + - php: 7.0 + - php: 7.1 + - php: nightly + - php: hhvm + - php: hhvm-nightly fast_finish: true allow_failures: - php: nightly - - php: 5.3 + - php: hhvm-nightly before_script: - composer install --prefer-dist --no-interaction --no-progress