mirror of
https://github.com/predis/predis.git
synced 2026-10-17 17:25:56 +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:
@@ -21,7 +21,7 @@ class IntegerResponseTest extends PredisTestCase
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testInteger()
|
||||
public function testInteger(): void
|
||||
{
|
||||
$connection = $this->getMockConnectionOfType('Predis\Connection\CompositeConnectionInterface');
|
||||
$connection
|
||||
@@ -42,7 +42,7 @@ class IntegerResponseTest extends PredisTestCase
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testNull()
|
||||
public function testNull(): void
|
||||
{
|
||||
$connection = $this->getMockConnectionOfType('Predis\Connection\CompositeConnectionInterface');
|
||||
$connection
|
||||
@@ -60,7 +60,7 @@ class IntegerResponseTest extends PredisTestCase
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testInvalid()
|
||||
public function testInvalid(): void
|
||||
{
|
||||
$this->expectException('Predis\Protocol\ProtocolException');
|
||||
$this->expectExceptionMessage("Cannot parse 'invalid' as a valid numeric response [tcp://127.0.0.1:6379]");
|
||||
|
||||
Reference in New Issue
Block a user