Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing: ClockMock using @group annotation #7500

Closed
ComaVN opened this issue Feb 15, 2017 · 0 comments
Closed

missing: ClockMock using @group annotation #7500

ComaVN opened this issue Feb 15, 2017 · 0 comments
Labels
hasPR A Pull Request has already been submitted for this issue. PHPUnitBridge

Comments

@ComaVN
Copy link

ComaVN commented Feb 15, 2017

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

@javiereguiluz javiereguiluz added hasPR A Pull Request has already been submitted for this issue. Missing Documentation PHPUnitBridge labels Feb 15, 2017
xabbuh added a commit that referenced this issue Apr 15, 2017
…viereguiluz)

This PR was merged into the 2.8 branch.

Discussion
----------

Explain better how to enable the ClockMock annotation

This fixes #7500.

Commits
-------

13baa4d Explain better how to enable the ClockMock annotation
@xabbuh xabbuh closed this as completed Apr 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hasPR A Pull Request has already been submitted for this issue. PHPUnitBridge
Projects
None yet
Development

No branches or pull requests

3 participants