Skip to content

missing: ClockMock using @group annotation #7500

Closed
@ComaVN

Description

@ComaVN

According to the documentation, the @group time-sensitive annotation is the preferred way to use the ClockMock in unittests.

However, this does not work out of the box, without registering Symfony\Bridge\PhpUnit\SymfonyTestsListener or using simple-phpunit. This should probably be explained in the documentation. (The 3.2 documentation doesn't mention it's required for using the ClockMock feature, and the 2.8 documentation doesn't even mention simple-phpunit at all, and I can't find it in vendor/bin)

See https://github.com/ComaVN/symfony-phpunit-bridge-clockmock for a test case

See also symfony/symfony#21612

Metadata

Metadata

Assignees

No one assigned

    Labels

    PHPUnitBridgehasPRA Pull Request has already been submitted for this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions