You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We wan't to create a Redis mock to inject them into another class that expects an instance of Redis.
Our solution now is to not use the factory but creating RedisMock directly, remove the typehint in our sut and inject the RedisMock directly.
System Informations
OS: Linux
PHP: PHP 7.1.10-1+0~20170929170631.9+jessie~1.gbp501135 (cli)
phpredis: 3.1.2
ArgumentCountError: Too few arguments to function M6Web\Component\RedisMock\RedisMock::hsetnx(), 0 passed in vendor/m6web/redis-mock/src/M6Web/Component/RedisMock/RedisMockFactory.php(226) : eval()'d code on line 370 and exactly 3 expected
vendor/m6web/redis-mock/src/M6Web/Component/RedisMock/RedisMock.php:579
More informations
we debugged a bit and found out that the reflection of Redis give no details about the parameters for most of the methods.
We discovered an issue with phpredis.
We wan't to create a Redis mock to inject them into another class that expects an instance of
Redis
.Our solution now is to not use the factory but creating
RedisMock
directly, remove the typehint in our sut and inject the RedisMock directly.System Informations
OS: Linux
PHP:
PHP 7.1.10-1+0~20170929170631.9+jessie~1.gbp501135 (cli)
phpredis: 3.1.2
Reproduce
Error
More informations
we debugged a bit and found out that the reflection of
Redis
give no details about the parameters for most of the methods.The text was updated successfully, but these errors were encountered: