From 7ddb62cb0a9e146f52729a92cba00ca5a42105e0 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Wed, 11 Dec 2019 13:24:30 +0100 Subject: [PATCH] allow phpunit 6 and 7 --- composer.json | 2 +- inc/AbstractLoader.php | 6 +++--- inc/BaseCase.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index b782bda5..cbd64f36 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "require": { "php": "^5.6|^7.0", "phpcr/phpcr-implementation": "2.1.*", - "phpunit/phpunit": "^5.7" + "phpunit/phpunit": "^5.7 || ^6.4 || ^7.0" }, "autoload": { "psr-4": { diff --git a/inc/AbstractLoader.php b/inc/AbstractLoader.php index 117d1710..34487e89 100644 --- a/inc/AbstractLoader.php +++ b/inc/AbstractLoader.php @@ -17,7 +17,7 @@ use PHPCR\RepositoryFactoryInterface; use PHPCR\RepositoryInterface; use PHPCR\SessionInterface; -use PHPUnit_Framework_SkippedTestSuiteError; +use PHPUnit\Framework\SkippedTestSuiteError; /** * Base class for the bootstrapping to load your phpcr implementation for the @@ -216,7 +216,7 @@ public function getAdditionalSession($credentials = false) * * @return SessionInterface * - * @throws PHPUnit_Framework_SkippedTestSuiteError to make whole test + * @throws SkippedTestSuiteError to make whole test * suite skip if implementation does not support updating the * properties automatically. */ @@ -226,7 +226,7 @@ public function getSessionWithLastModified() return $this->getSession(); } - throw new PHPUnit_Framework_SkippedTestSuiteError('Not supported'); + throw new SkippedTestSuiteError('Not supported'); } /** diff --git a/inc/BaseCase.php b/inc/BaseCase.php index 0d14842c..75b3bd2f 100644 --- a/inc/BaseCase.php +++ b/inc/BaseCase.php @@ -18,7 +18,7 @@ use PHPCR\SessionInterface; use PHPCR\NodeInterface; use DateTime; -use PHPUnit_Framework_SkippedTestSuiteError; +use PHPUnit\Framework\SkippedTestSuiteError; use PHPUnit\Framework\TestCase; /** @@ -104,7 +104,7 @@ public static function setupBeforeClass($fixtures = 'general/base') list($phpcr, $tests, $chapter, $case) = explode('\\', $fqn); $case = "$chapter\\$case"; if (!self::$loader->getTestSupported($chapter, $case, null)) { - throw new PHPUnit_Framework_SkippedTestSuiteError('Test case not supported by this implementation'); + throw new SkippedTestSuiteError('Test case not supported by this implementation'); } self::$staticSharedFixture = [];