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

Pipeline not working? #58

Open
danields opened this issue Oct 12, 2017 · 1 comment
Open

Pipeline not working? #58

danields opened this issue Oct 12, 2017 · 1 comment

Comments

@danields
Copy link

So I'm using this project in a Lumen setup that uses Predis 1.1. Mocking a Redis server works perfectly when using individual Redis commands, however, I can't get it to work when using pipeline. When doing something like this:

$response = Redis::pipeline(function($pipe) {
   // Run redis commands here
});

I'm expecting that $response will be an array with command results. However, when mocking the Predis Client, I get an instance of RedisMock instead.

Is the pipeline support not fully implemented or am I missing something here?

Thanks.

@omansour
Copy link
Contributor

Usage is not well documented :/ and the mock is quite old

try this

$array = $redisMock->pipeline()->set()->set()->get() ....->exec()

sounds the way pipeline was conceived.

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

No branches or pull requests

2 participants