BedrockStreaming / RedisMock

A simple PHP Redis mock
http://tech.m6web.fr/redismock-qui-a-bouchonne-mon-redis.html
MIT License
81 stars 60 forks source link

Test SINTER and refactor #79

Closed tomlankhorst closed 5 years ago

tomlankhorst commented 5 years ago

Refactors SINTER like SDIFF #78 and add test.

key1 = {a,b,c,d}
key2 = {c}
key3 = {a,c,e}
SINTER key1 key2 key3 = {c}

Test

$redisMock = new Redis();
$redisMock->sadd('key1', 'a', 'b', 'c', 'd');
$redisMock->sadd('key2', 'c');
$redisMock->sadd('key3', 'a', 'c', 'e');
$this->assert
    ->array($redisMock->sinter('key1', 'key2', 'key3'))
    ->isEqualTo(['c']);
omansour commented 5 years ago

hey @tomlankhorst - can you please make the PR mergeable ? Many thanks

tomlankhorst commented 5 years ago

Rebased... 👌

tomlankhorst commented 5 years ago

By the way, have you got your Packagist Github callbacks in place? :)

omansour commented 5 years ago

v4.5.0