mirror of
https://github.com/predis/predis.git
synced 2026-08-30 20:21:31 +00:00
get phpunit running
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user