diff --git a/.travis.yml b/.travis.yml index d08c961..22ed832 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,13 +2,15 @@ language: php matrix: include: - - php: 5.3 - php: 5.4 - php: 5.5 env: COMPOSER_OPTS="--prefer-lowest" - php: 5.6 - php: 7.0 + - php: 7.1 + - php: 7.2 - php: hhvm + env: COMPOSER_OPTS="--prefer-lowest" before_install: - sudo apt-get update -qq @@ -19,4 +21,4 @@ install: - composer update $COMPOSER_OPTS script: - - phpunit tests + - vendor/bin/phpunit diff --git a/composer.json b/composer.json index 35b75ab..6bfc08b 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "symfony/console": "~2.3 || ~3.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "~4.8.36 || ~5.7 || ~6.4" }, "autoload": { "psr-4": { diff --git a/tests/Stecman/Component/Symfony/Console/BashCompletion/Common/CompletionHandlerTestCase.php b/tests/Stecman/Component/Symfony/Console/BashCompletion/Common/CompletionHandlerTestCase.php index f4d4a65..af4e743 100644 --- a/tests/Stecman/Component/Symfony/Console/BashCompletion/Common/CompletionHandlerTestCase.php +++ b/tests/Stecman/Component/Symfony/Console/BashCompletion/Common/CompletionHandlerTestCase.php @@ -2,6 +2,7 @@ namespace Stecman\Component\Symfony\Console\BashCompletion\Tests\Common; +use PHPUnit\Framework\TestCase; use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext; use Stecman\Component\Symfony\Console\BashCompletion\CompletionHandler; use Symfony\Component\Console\Application; @@ -9,7 +10,7 @@ /** * Base test case for running CompletionHandlers */ -abstract class CompletionHandlerTestCase extends \PHPUnit_Framework_TestCase +abstract class CompletionHandlerTestCase extends TestCase { /** * @var Application diff --git a/tests/Stecman/Component/Symfony/Console/BashCompletion/CompletionContextTest.php b/tests/Stecman/Component/Symfony/Console/BashCompletion/CompletionContextTest.php index 244ca33..9374d13 100644 --- a/tests/Stecman/Component/Symfony/Console/BashCompletion/CompletionContextTest.php +++ b/tests/Stecman/Component/Symfony/Console/BashCompletion/CompletionContextTest.php @@ -2,10 +2,11 @@ namespace Stecman\Component\Symfony\Console\BashCompletion\Tests; +use PHPUnit\Framework\TestCase; use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext; use Stecman\Component\Symfony\Console\BashCompletion\EnvironmentCompletionContext; -class CompletionContextTest extends \PHPUnit_Framework_TestCase +class CompletionContextTest extends TestCase { public function testWordBreakSplit() diff --git a/tests/Stecman/Component/Symfony/Console/BashCompletion/HookFactoryTest.php b/tests/Stecman/Component/Symfony/Console/BashCompletion/HookFactoryTest.php index f697cb5..c253a62 100644 --- a/tests/Stecman/Component/Symfony/Console/BashCompletion/HookFactoryTest.php +++ b/tests/Stecman/Component/Symfony/Console/BashCompletion/HookFactoryTest.php @@ -2,9 +2,10 @@ namespace Stecman\Component\Symfony\Console\BashCompletion\Tests; +use PHPUnit\Framework\TestCase; use Stecman\Component\Symfony\Console\BashCompletion\HookFactory; -class HookFactoryTest extends \PHPUnit_Framework_TestCase +class HookFactoryTest extends TestCase { /** * @var HookFactory @@ -91,9 +92,7 @@ protected function assertSyntaxIsValid($code, $syntaxCheckCommand, $context) $status = proc_close($process); - if ($status !== 0) { - $this->fail("Syntax check for $context failed:\n$output"); - } + $this->assertSame(0, $status, "Syntax check for $context failed:\n$output"); } else { throw new \RuntimeException("Failed to start process with command '$syntaxCheckCommand'"); }