PHPackages                             josiasmontag/laravel-redis-mock - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. josiasmontag/laravel-redis-mock

ActiveLibrary[Localization &amp; i18n](/categories/localization)

josiasmontag/laravel-redis-mock
===============================

This Laravel package provides a Redis mock for your tests

1.3.6(2mo ago)471.8M—4.3%11[2 issues](https://github.com/josiasmontag/laravel-redis-mock/issues)15MITPHPPHP &gt;=7.1.0CI passing

Since Nov 3Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/josiasmontag/laravel-redis-mock)[ Packagist](https://packagist.org/packages/josiasmontag/laravel-redis-mock)[ Docs](https://github.com/josiasmontag/laravel-redis-mock)[ RSS](/packages/josiasmontag-laravel-redis-mock/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (5)Versions (20)Used By (15)

Laravel Redis Mock
==================

[](#laravel-redis-mock)

[![Build Status](https://github.com/josiasmontag/laravel-redis-mock/actions/workflows/run-tests.yml/badge.svg)](https://github.com/josiasmontag/laravel-redis-mock/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/b1527f815882833c2a1d05bb6f9bcef8d96a9e61924d17b9a84fa27639fc7469/68747470733a2f2f706f7365722e707567782e6f72672f6a6f736961736d6f6e7461672f6c61726176656c2d72656469732d6d6f636b2f642f746f74616c2e737667)](https://packagist.org/packages/josiasmontag/laravel-redis-mock)[![Latest Stable Version](https://camo.githubusercontent.com/2c981424c6c9005a45e31543dbd7f6f8341a92bcd0b4c511d38e41c50cee71c1/68747470733a2f2f706f7365722e707567782e6f72672f6a6f736961736d6f6e7461672f6c61726176656c2d72656469732d6d6f636b2f762f737461626c652e737667)](https://packagist.org/packages/josiasmontag/laravel-redis-mock)[![License](https://camo.githubusercontent.com/ea8357e9a244d64d226763e7e9da8bebb3851dfcb6df0dd6f86c2040f5087a4b/68747470733a2f2f706f7365722e707567782e6f72672f6a6f736961736d6f6e7461672f6c61726176656c2d72656469732d6d6f636b2f6c6963656e73652e737667)](https://packagist.org/packages/josiasmontag/laravel-redis-mock)

This Laravel package provides a Redis mock for your tests. It depends on [Redis PHP Mock](https://github.com/M6Web/RedisMock).

This makes it possible to run your tests without any local Redis server running!

Installation &amp; Usage
------------------------

[](#installation--usage)

To get started, use Composer to add the package to your project's dependencies:

```
composer require josiasmontag/laravel-redis-mock

```

This package adds a new `mock` Redis client.

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

```
    'redis' => [

        'client' => env('REDIS_CLIENT', 'predis'),

        ...

    ],
```

Now, you can switch to the `mock` client in your `.env.testing`:

```
REDIS_CLIENT=mock

```

Alternatively, you can switch to the mock in your `phpunit.xml`:

```

```

Done! Your tests should work without a local redis server running.

Package Development
-------------------

[](#package-development)

If you are using Redis as part of a Laravel package, you should already have a `TestCase.php` that is extending `Orchestra\Testbench\Testcase`.

Within this file you should add `RedisMockServiceProvider` to `getPackageProviders` method e.g.

```
    /**
     * @param $app
     * @return string[]
     */
    protected function getPackageProviders($app): array
    {
        return [
            YourPackageServiceProvider::class,
            \Lunaweb\RedisMock\Providers\RedisMockServiceProvider::class
        ];
    }

```

###  Health Score

61

—

FairBetter than 99% of packages

Maintenance84

Actively maintained with recent releases

Popularity53

Moderate usage in the ecosystem

Community28

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 73.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~168 days

Recently: every ~276 days

Total

19

Last Release

84d ago

PHP version history (2 changes)1.0.0PHP &gt;=7.0.0

1.0.2PHP &gt;=7.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/07b14ffb44d0a4e799d313482990b85e88f70d0f1a3bdbb9189134c499c4e695?d=identicon)[josiasmontag](/maintainers/josiasmontag)

---

Top Contributors

[![josiasmontag](https://avatars.githubusercontent.com/u/1945577?v=4)](https://github.com/josiasmontag "josiasmontag (31 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (5 commits)")[![mikehuboo](https://avatars.githubusercontent.com/u/103517864?v=4)](https://github.com/mikehuboo "mikehuboo (2 commits)")[![sevrugin](https://avatars.githubusercontent.com/u/4169835?v=4)](https://github.com/sevrugin "sevrugin (2 commits)")[![manuel-carofiglio-vema](https://avatars.githubusercontent.com/u/265762969?v=4)](https://github.com/manuel-carofiglio-vema "manuel-carofiglio-vema (1 commits)")[![tomlankhorst](https://avatars.githubusercontent.com/u/675432?v=4)](https://github.com/tomlankhorst "tomlankhorst (1 commits)")

---

Tags

phplaravellocalizationlanguage

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/josiasmontag-laravel-redis-mock/health.svg)

```
[![Health](https://phpackages.com/badges/josiasmontag-laravel-redis-mock/health.svg)](https://phpackages.com/packages/josiasmontag-laravel-redis-mock)
```

###  Alternatives

[mcamara/laravel-localization

Easy localization for Laravel

3.5k9.1M112](/packages/mcamara-laravel-localization)[codezero/laravel-localized-routes

A convenient way to set up, manage and use localized routes in a Laravel app.

543638.1k4](/packages/codezero-laravel-localized-routes)[codezero/laravel-localizer

Automatically detect and set an app locale that matches your visitor's preference.

50394.3k4](/packages/codezero-laravel-localizer)[josiasmontag/laravel-localization

Localization for Laravel framework

2336.2k](/packages/josiasmontag-laravel-localization)[opgginc/codezero-laravel-localized-routes

A convenient way to set up, manage and use localized routes in a Laravel app.

2770.1k1](/packages/opgginc-codezero-laravel-localized-routes)[awes-io/localization-helper

Package for convenient work with Laravel's localization features

3527.1k4](/packages/awes-io-localization-helper)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
