Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support of commands quit, scan, monitor and rpoplpush for redisMock #65

Merged
merged 1 commit into from Mar 23, 2018

Conversation

DocRoms
Copy link
Contributor

@DocRoms DocRoms commented Mar 16, 2018

Because I want to add few command on the REDIS mock

  • Add quit command
  • Add rpolpush method
  • Add scan command
  • Add monitor command
  • Reordering readme functions list
  • Add tests and fix old.

@DocRoms DocRoms self-assigned this Mar 16, 2018
@DocRoms DocRoms changed the title init PR (add supports for redis commands) Add support of commands quit, scan, monitor and getProfile for redisMock Mar 19, 2018
@DocRoms DocRoms force-pushed the feature/add-support-for-commands-and-profile branch from 827fb11 to 8dacb7d Compare March 19, 2018 16:02
*/
public function scan(): array
{
return [];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you return a empty array, how can you use the mock ? You should scan the dataValues and look into deleteOnTtlExpired.

/**
* Mock the getProfile()
*/
public function getProfile()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why getProfile ? is it a redis command ? Why do you return a ProfileMock ?

@DocRoms DocRoms force-pushed the feature/add-support-for-commands-and-profile branch from 6e1361c to 6efde52 Compare March 19, 2018 17:16
@DocRoms DocRoms changed the title Add support of commands quit, scan, monitor and getProfile for redisMock Add support of commands quit, scan, monitor and rpoplpush for redisMock Mar 20, 2018
@DocRoms DocRoms force-pushed the feature/add-support-for-commands-and-profile branch 2 times, most recently from 9179337 to db74385 Compare March 22, 2018 16:04
$values[] = $keysArray[$i];
}

}else{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cs fixer

@@ -69,6 +69,7 @@ Redis command | Description
**LRANGE** *key* *start* *stop* | Gets a range of elements from a list
**MGET** *array\<field\>* | Gets the values of multiple keys
**MSET** *array\<field, value\>* | Sets the string values of multiple keys
**QUIT** | Quit the REDIS
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DocRoms DocRoms force-pushed the feature/add-support-for-commands-and-profile branch 4 times, most recently from a9e1104 to c69b19d Compare March 23, 2018 10:13
fix s comment, syntax and style

Improve version of predis

ImAdd Method implementation and tests

update the readme

test tests...

Fix  old test

remove useless predis/client method on the redis mock, add rpoplpush

add  constructorParameters and Scan command on redisMock

Add comments and readme informations

remove useless code

Fix method definition after tests

FiFix scan of redis mock

FiFix style

Reorder Readme list of functions

Add the scan test and fix scan count

Fix TTL test based from sleep...

Fix TTL test based from sleep...

Fix TTL test based from sleep...

Fix TTL test based from sleep...
@DocRoms DocRoms force-pushed the feature/add-support-for-commands-and-profile branch from 04b05ff to 67c4384 Compare March 23, 2018 10:52
@DocRoms DocRoms merged commit 20766b8 into master Mar 23, 2018
@DocRoms DocRoms deleted the feature/add-support-for-commands-and-profile branch March 23, 2018 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants