PHPackages                             kodus/mock-cache - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. kodus/mock-cache

ActiveLibrary[Testing &amp; Quality](/categories/testing)

kodus/mock-cache
================

PSR-16 cache-implementation for integration tests

2.1.0(1y ago)260.3k↓24.3%15MITPHPPHP &gt;= 8.0

Since Dec 2Pushed 1y ago2 watchersCompare

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

READMEChangelog (5)Dependencies (3)Versions (7)Used By (5)

kodus/mock-cache
================

[](#kodusmock-cache)

[![PHP Version](https://camo.githubusercontent.com/487804500a039aee09e5d93e41b745b4cd68dcc0fdf801e67d26d30b93f83358/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e302532422d626c75652e737667)](https://packagist.org/packages/kodus/mock-cache)[![Build Status](https://camo.githubusercontent.com/83ec2747891a186954dd87e34ca4a0e9febeee4bd694fe82e50721533192d83b/68747470733a2f2f7472617669732d63692e6f72672f6b6f6475732f6d6f636b2d63616368652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/kodus/mock-cache)[![Code Coverage](https://camo.githubusercontent.com/729c67ca16fe7a47f0915f87c1f8ece779c9b66938e510bacf058519609f7ab5/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6b6f6475732f6d6f636b2d63616368652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/kodus/mock-cache/?branch=master)

This library provides a [PSR-16](https://github.com/php-fig/fig-standards/blob/master/proposed/simplecache.md)cache-implementation for integration testing, backed by a simple `array`.

It simulates a simple system clock and expiration - in your tests, calling e.g. `$cache->skipTime(10)` will travel forward in time 10 seconds, but time will otherwise stand still, so you don't need to write integration tests that have to `sleep()` to test for side-effects from cache-expiration.

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance41

Moderate activity, may be stable

Popularity33

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~592 days

Recently: every ~723 days

Total

6

Last Release

494d ago

Major Versions

0.1.0 → 1.0.02017-02-07

1.1.0 → 2.0.02022-08-24

PHP version history (2 changes)0.1.0PHP &gt;= 5.6

1.1.0PHP &gt;= 8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/ec1a54f85a6e46909df4ca4852ada0cc4b1482f7208dfc487d05554087e09cc9?d=identicon)[thomasnordahl-dk](/maintainers/thomasnordahl-dk)

![](https://www.gravatar.com/avatar/9d0432f9ee26cc6265bcf3817d88bf40a4a8669a603785b34946e9c15d7b3451?d=identicon)[boan-jfm](/maintainers/boan-jfm)

![](https://www.gravatar.com/avatar/22799a8c3c482e408f78fd86a999b271f1d5fd2e04b433c6d199f717b3032bb2?d=identicon)[JyskFynskeMedierJoej](/maintainers/JyskFynskeMedierJoej)

![](https://www.gravatar.com/avatar/a974d9ad4b2be14736394ce117f53f83e9186e9cc05002bc004678f0b0587e37?d=identicon)[mifich](/maintainers/mifich)

---

Top Contributors

[![mindplay-dk](https://avatars.githubusercontent.com/u/103348?v=4)](https://github.com/mindplay-dk "mindplay-dk (3 commits)")[![vortrixs](https://avatars.githubusercontent.com/u/15426116?v=4)](https://github.com/vortrixs "vortrixs (3 commits)")[![boan-jfm](https://avatars.githubusercontent.com/u/13201214?v=4)](https://github.com/boan-jfm "boan-jfm (2 commits)")

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/kodus-mock-cache/health.svg)

```
[![Health](https://phpackages.com/badges/kodus-mock-cache/health.svg)](https://phpackages.com/packages/kodus-mock-cache)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[instaclick/php-webdriver

PHP WebDriver for Selenium 2

43661.8M22](/packages/instaclick-php-webdriver)[spatie/phpunit-snapshot-assertions

Snapshot testing with PHPUnit

69617.9M510](/packages/spatie-phpunit-snapshot-assertions)[szepeviktor/phpstan-wordpress

WordPress extensions for PHPStan

3287.8M898](/packages/szepeviktor-phpstan-wordpress)[dms/phpunit-arraysubset-asserts

This package provides ArraySubset and related asserts once deprecated in PHPUnit 8

14327.7M294](/packages/dms-phpunit-arraysubset-asserts)

PHPackages © 2026

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