aragorn-yang/laravel-array-redis

This package is abandoned and no longer maintained. The author suggests using the josiasmontag/laravel-redis-mock package instead.

A laravel wrapper for M6Web/RedisMock

v2.1.0 2020-01-09 17:38 UTC

This package is auto-updated.

Last update: 2020-01-09 17:52:28 UTC


README

A laravel wrapper for M6Web/RedisMock. You can mock your Redis in your tests without a running redis server.

Build Status Total Downloads Latest Stable Version License

Installation & Usage

Use Composer to add this package to your project's dev-dependencies:

composer require --dev aragorn-yang/laravel-array-redis

In config/database.php, make the Redis client configurable via environment variable:

'redis' => [
    'client' => env('REDIS_CLIENT', 'predis'),
],

Now, you can switch to the array client via environment setting.

  1. You can set it in your .env.testing:
REDIS_CLIENT=array
  1. Alternatively, you can do it in your phpunit.xml:
<env name="REDIS_CLIENT" value="array"/>