get phpunit running

This commit is contained in:
Till Krüss
2020-08-13 08:41:43 -07:00
parent 44f98e6635
commit 64937f725b
3 changed files with 9 additions and 9 deletions
@@ -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();
}
+1 -1
View File
@@ -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;
+4 -4
View File
@@ -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;