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(4mo ago)471.9M↓43.1%11[2 issues](https://github.com/josiasmontag/laravel-redis-mock/issues)15MITPHPPHP &gt;=7.1.0CI failing

Since Nov 3Pushed 4mo 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 3d 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

59

—

FairBetter than 98% of packages

Maintenance76

Regular maintenance activity

Popularity53

Moderate usage in the ecosystem

Community29

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

130d 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

[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[codezero/laravel-localized-routes

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

544664.5k4](/packages/codezero-laravel-localized-routes)[josiasmontag/laravel-localization

Localization for Laravel framework

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

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

29119.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)[niels-numbers/laravel-localizer

Detects the user’s preferred language and redirects to the matching localized URL.

183.4k](/packages/niels-numbers-laravel-localizer)

PHPackages © 2026

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