Skip to content

Thought: rename Buildatable::random to avoid misunderstanding about the randomness of what it provide #8

@brambaud

Description

@brambaud

Keeping in mind 1 of the 4 rules of the Test Data Builder Pattern:

  • Initialize its properties to commonly used or safe values

Let's cite the actual README.md:

The Buildotter\Core\Buildatable::random() method is the named constructor to create a new instance of the class with random but commonly used or safe values. Imagine that you develop a dating app, you know the age of your customers. Most of the time you don't mind about the exact age, you just need one respecting the invariants of your domain (see Propery-Based Testing for more about this). It is less likely that a customer is 300 or 10 years old than between 18 and 60 years old for instance.

It seems Buildatable::random may be misleading about this according to some feedbacks.

Breaking changes

BC breaks to be expected

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions