Skip to content

Extract an AbstractEventDispatcherTest from EventDispatcherTest #12131

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

Conversation

znerol
Copy link
Contributor

@znerol znerol commented Oct 4, 2014

Allow third party implementations of EventDispatcherInterface to reuse the EventDispatcherTest unit tests. Also instantly expand test coverage of ContainerAwareEventDispatcher by rebasing it onto the new AbstractEventDispatcherTest.

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

…lso use it in ContainerAwareEventDispatcherTest
@znerol
Copy link
Contributor Author

znerol commented Oct 4, 2014

Using git diff -b master:src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php to generate a cross-branch diff: https://gist.github.com/znerol/c2f044f3f15f1f7e3f1d

@linaori
Copy link
Contributor

linaori commented Oct 5, 2014

What's the use-case where you want to do this?

@znerol
Copy link
Contributor Author

znerol commented Oct 6, 2014

This would help projects supplying their own implementations of the EventDispatcher to maintain compatibility.

@fabpot
Copy link
Member

fabpot commented Nov 20, 2014

Thank you @znerol.

fabpot added a commit that referenced this pull request Nov 20, 2014
…herTest (znerol)

This PR was submitted for the master branch but it was merged into the 2.6 branch instead (closes #12131).

Discussion
----------

Extract an AbstractEventDispatcherTest from EventDispatcherTest

Allow third party implementations of `EventDispatcherInterface` to reuse the `EventDispatcherTest` unit tests. Also instantly expand test coverage of `ContainerAwareEventDispatcher` by rebasing it onto the new `AbstractEventDispatcherTest`.

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

Commits
-------

8871368 Extract an AbstractEventDispatcherTest from EventDispatcherTest and also use it in ContainerAwareEventDispatcherTest
@fabpot fabpot closed this Nov 20, 2014
@Tobion
Copy link
Contributor

Tobion commented Nov 22, 2014

If AbstractEventDispatcherTest is meant to be used in other projects, it must be in another namespace. As we did in other cases as well.

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.

5 participants