stratadox/random

Simple random generator abstraction

Maintainers

Package info

github.com/Stratadox/Random

pkg:composer/stratadox/random

Statistics

Installs: 7

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

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

This package is auto-updated.

Last update: 2026-03-14 09:31:57 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.