From 64937f725bb4d027e326482fb8f8695e836cdbff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kru=CC=88ss?= Date: Thu, 13 Aug 2020 08:41:43 -0700 Subject: [PATCH] get phpunit running --- tests/PHPUnit/ArrayHasSameValuesConstraint.php | 8 ++++---- tests/PHPUnit/PredisTestCase.php | 2 +- tests/PHPUnit/RedisCommandConstraint.php | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/PHPUnit/ArrayHasSameValuesConstraint.php b/tests/PHPUnit/ArrayHasSameValuesConstraint.php index 9391e780..7605017e 100644 --- a/tests/PHPUnit/ArrayHasSameValuesConstraint.php +++ b/tests/PHPUnit/ArrayHasSameValuesConstraint.php @@ -12,7 +12,7 @@ /** * Constraint that accepts arrays with the same elements but different order. */ -class ArrayHasSameValuesConstraint extends \PHPUnit_Framework_Constraint +class ArrayHasSameValuesConstraint extends \PHPUnit\Framework\Constraint\Constraint { protected $array; @@ -27,7 +27,7 @@ class ArrayHasSameValuesConstraint extends \PHPUnit_Framework_Constraint /** * {@inheritdoc} */ - public function matches($other) + public function matches($other): bool { if (count($this->array) !== count($other)) { return false; @@ -43,7 +43,7 @@ class ArrayHasSameValuesConstraint extends \PHPUnit_Framework_Constraint /** * {@inheritdoc} */ - public function toString() + public function toString(): string { return 'two arrays contain the same elements.'; } @@ -51,7 +51,7 @@ class ArrayHasSameValuesConstraint extends \PHPUnit_Framework_Constraint /** * {@inheritdoc} */ - protected function failureDescription($other) + protected function failureDescription($other): string { return $this->toString(); } diff --git a/tests/PHPUnit/PredisTestCase.php b/tests/PHPUnit/PredisTestCase.php index ed159785..8e130fd5 100644 --- a/tests/PHPUnit/PredisTestCase.php +++ b/tests/PHPUnit/PredisTestCase.php @@ -17,7 +17,7 @@ use Predis\Profile; /** * Base test case class for the Predis test suite. */ -abstract class PredisTestCase extends \PHPUnit_Framework_TestCase +abstract class PredisTestCase extends \PHPUnit\Framework\TestCase { protected $redisServerVersion = null; diff --git a/tests/PHPUnit/RedisCommandConstraint.php b/tests/PHPUnit/RedisCommandConstraint.php index 9d61aac7..6511143a 100644 --- a/tests/PHPUnit/RedisCommandConstraint.php +++ b/tests/PHPUnit/RedisCommandConstraint.php @@ -15,7 +15,7 @@ use SebastianBergmann\Exporter\Exporter; /** * Constraint that verifies a redis command. */ -class RedisCommandConstraint extends \PHPUnit_Framework_Constraint +class RedisCommandConstraint extends \PHPUnit\Framework\Constraint\Constraint { protected $commandID; protected $arguments; @@ -38,7 +38,7 @@ class RedisCommandConstraint extends \PHPUnit_Framework_Constraint /** * {@inheritdoc} */ - public function matches($other) + public function matches($other): bool { if (!$other instanceof CommandInterface) { return false; @@ -71,7 +71,7 @@ class RedisCommandConstraint extends \PHPUnit_Framework_Constraint * @todo Improve output using diff when expected and actual arguments of a * command do not match. */ - public function toString() + public function toString(): string { $exporter = new Exporter(); $string = 'is a Redis command'; @@ -91,7 +91,7 @@ class RedisCommandConstraint extends \PHPUnit_Framework_Constraint /** * {@inheritdoc} */ - protected function failureDescription($other) + protected function failureDescription($other): string { $string = is_object($other) ? get_class($other) : $other;