mirror of
https://github.com/predis/predis.git
synced 2026-08-30 20:21: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:
@@ -20,7 +20,7 @@ class BRPOP_Test extends PredisCommandTestCase
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getExpectedCommand()
|
||||
protected function getExpectedCommand(): string
|
||||
{
|
||||
return 'Predis\Command\Redis\BRPOP';
|
||||
}
|
||||
@@ -28,7 +28,7 @@ class BRPOP_Test extends PredisCommandTestCase
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getExpectedId()
|
||||
protected function getExpectedId(): string
|
||||
{
|
||||
return 'BRPOP';
|
||||
}
|
||||
@@ -36,7 +36,7 @@ class BRPOP_Test extends PredisCommandTestCase
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testFilterArguments()
|
||||
public function testFilterArguments(): void
|
||||
{
|
||||
$arguments = array('key1', 'key2', 'key3', 10);
|
||||
$expected = array('key1', 'key2', 'key3', 10);
|
||||
@@ -50,7 +50,7 @@ class BRPOP_Test extends PredisCommandTestCase
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testFilterArgumentsKeysAsSingleArray()
|
||||
public function testFilterArgumentsKeysAsSingleArray(): void
|
||||
{
|
||||
$arguments = array(array('key1', 'key2', 'key3'), 10);
|
||||
$expected = array('key1', 'key2', 'key3', 10);
|
||||
@@ -64,7 +64,7 @@ class BRPOP_Test extends PredisCommandTestCase
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testParseResponse()
|
||||
public function testParseResponse(): void
|
||||
{
|
||||
$raw = array('key', 'value');
|
||||
$expected = array('key', 'value');
|
||||
|
||||
Reference in New Issue
Block a user