Skip to content

setUpBeforeClass isn't called before setting up data providers #6838

@earthiverse

Description

@earthiverse

I updated all my dependencies, and now the constructors are marked final.

So, I set up a static class property in setUpBeforeClass instead, but when I try to run the test, I get

Error: Typed static property Test::$property must not be accessed before initialization

I have a workaround by calling self::setUpBeforeClass(); at the top of the data providers, and ensuring the logic in setUpBeforeClass handles being run multiple times.

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