Mock built-in PHP functions (e.g. time() or rand()) in PHPUnit.
-
Updated
Aug 7, 2026 - PHP
Mock built-in PHP functions (e.g. time() or rand()) in PHPUnit.
Mock non deterministic built-in PHP functions (e.g. time() or rand()) with Mockery.
Mock built-in PHP functions (e.g. time()) with Prophecy (phpspec).
To associate your repository with the php-mock topic, visit your repo's landing page and select "manage topics."