Skip to content

[Bridge\PhpUnit] Add extra clock-mocked namespaces in phpunit.xml.dist #16502

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

Merged
merged 1 commit into from
Nov 9, 2015

Conversation

nicolas-grekas
Copy link
Member

Q A
Bug fix? yes
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

This fixes the currently failing tests on travis by:

  • checking for class existence before checking for groups, recursively now, when loading @group time-sensitive annotations
  • allow specifying extra clock-mocked namespaces in phpunit.xml files, required e.g. when HttpKernel is tested standalone and requires clock-mocks to be enabled for the HttpFoundation namespace.

@nicolas-grekas nicolas-grekas merged commit cd36c07 into symfony:2.8 Nov 9, 2015
nicolas-grekas added a commit that referenced this pull request Nov 9, 2015
…phpunit.xml.dist (nicolas-grekas)

This PR was merged into the 2.8 branch.

Discussion
----------

[Bridge\PhpUnit] Add extra clock-mocked namespaces in phpunit.xml.dist

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This fixes the currently failing tests on travis by:
- checking for class existence before checking for groups, recursively now, when loading `@group time-sensitive` annotations
- allow specifying extra clock-mocked namespaces in phpunit.xml files, required e.g. when HttpKernel is tested standalone and requires clock-mocks to be enabled for the HttpFoundation namespace.

Commits
-------

cd36c07 [Bridge\PhpUnit] Add extra clock-mocked namespaces in phpunit.xml.dist
@nicolas-grekas nicolas-grekas deleted the fix-phpunit-bridge branch November 9, 2015 10:44
}
}
if (self::$globallyEnabled) {
$this->state = -2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to define these states as constants so others could understand what they mean ;)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but this is private internal details, and constants are public... and giving a name is hard :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's hard indeed ;)

@fabpot fabpot mentioned this pull request Nov 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants