stratadox/random

Simple random generator abstraction

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/stratadox/random

v0.1 2021-02-13 22:38 UTC

This package is auto-updated.

Last update: 2025-09-14 08:25:40 UTC


README

Github Action codecov Scrutinizer Code Quality Latest Stable Version License

Simple random generator abstraction.

Installation

Install with: composer install stratadox/random

Why use this

Code that involves random is tricky to test. Using this package, you can inject an IntegerGenerator. In the production setup, you inject the RandomIntegerGenerator. By injecting a PredefinedIntegerGenerator during testing, you can test the code for one or more predefined outcomes of the IntegerGenerator.