Skip to content

mt_rand sequences differ between runs with mock cache being warmed and without #45

Description

@niceblex33

Hi. In our phpunit test we use srand to set initial value for the random number generator. After we started to use softmocks we've encountered the problem which was inequality between expected and actual results in tests which cover a code which uses the mt_rand function.

The reason was that during creation of mock cache the PrettyPrinterAbstract is called and mt_rand ran. It would be better to think not to use mt_rand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions