mirror of
https://github.com/predis/predis.git
synced 2026-10-10 22:07:31 +00:00
[tests] Start improving test suite.
- Make use of more typehints for function parameters - Make use of typehints for function return values - Use @var where needed to give proper hints to IDEs and avoid warnings - Replace MockObject::setMethods() with addMethods() and onlyMethods() - Rewording of some phpdocs
This commit is contained in:
@@ -23,7 +23,7 @@ class ServerExceptionTest extends PredisTestCase
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testExceptionMessage()
|
||||
public function testExceptionMessage(): void
|
||||
{
|
||||
$this->expectException('Predis\Response\ServerException');
|
||||
$this->expectExceptionMessage(self::ERR_WRONG_KEY_TYPE);
|
||||
@@ -34,7 +34,7 @@ class ServerExceptionTest extends PredisTestCase
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testExceptionClass()
|
||||
public function testExceptionClass(): void
|
||||
{
|
||||
$exception = new ServerException(self::ERR_WRONG_KEY_TYPE);
|
||||
|
||||
@@ -47,7 +47,7 @@ class ServerExceptionTest extends PredisTestCase
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testErrorType()
|
||||
public function testErrorType(): void
|
||||
{
|
||||
$exception = new ServerException(self::ERR_WRONG_KEY_TYPE);
|
||||
|
||||
@@ -57,7 +57,7 @@ class ServerExceptionTest extends PredisTestCase
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testToErrorResponse()
|
||||
public function testToErrorResponse(): void
|
||||
{
|
||||
$exception = new ServerException(self::ERR_WRONG_KEY_TYPE);
|
||||
$error = $exception->toErrorResponse();
|
||||
|
||||
Reference in New Issue
Block a user