Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Provide backwards compatibility for AggregateHydrator events #56

Merged
merged 3 commits into from
Feb 19, 2016

Conversation

weierophinney
Copy link
Member

Per #55 (and originally reported as zendframework/zend-hydrator#19), this patch does the following:

  • Adds tests against the hydrate and extract methods to ensure that the event triggered is the zend-stdlib variant (as well as kept the tests for the zend-hydrator variants).
  • Updated test expectations to check for triggerEvent() (and not trigger()), as the 1.1 version of zend-hydrator is now forwards-compatible with zend-eventmanager v3. This also required raising the minimum version of zend-hydrator to 1.1 so that tests do not need to be varied.
  • Fixes the test assumptions in testAdd(), as attachment of the aggregate listener now calls the attach() method of the listener class, changing how the mock EM instance is called.
  • Updates and fixes the DelegatingHydrator(Factory) tests, per similar changes done in zend-hydrator 1.1.

Per zendframework#55 (and originally reported as zendframework/zend-hydrator#19),
this patch does the following:

- Adds tests against the hydrate and extract methods to ensure that the
  event triggered is the zend-stdlib variant (as well as kept the tests
  for the zend-hydrator variants).
- Updated test expectations to check for `triggerEvent()` (and not
  `trigger()`), as the 1.1 version of zend-hydrator is now
  forwards-compatible with zend-eventmanager v3. This also required
  raising the minimum version of zend-hydrator to 1.1 so that tests do
  not need to be varied.
- Fixes the test assumptions in `testAdd()`, as attachment of the
  aggregate listener now calls the `attach()` method of the listener
  class, changing how the mock EM instance is called.
@weierophinney weierophinney self-assigned this Feb 19, 2016
@weierophinney weierophinney added this to the 2.7.6 milestone Feb 19, 2016
When updating zend-hydrator to 1.1, we discovered some testing issues
with the underlying functionality; additionally, due to the fact that
the `createService()` method of the factory delegates to the
`__invoke()` method, and the typehints are different (former uses
ServiceLocatorInterface, while latter uses ContainerInterface), and the
fact that the DelegatingHydrator constructor now accepts a
ContainerInterface (vs ServiceLocatorInterface), prophecy had to be used
to allow composing multiple interfaces in the mock object.
@weierophinney weierophinney merged commit 6ae5bea into zendframework:release-2.7 Feb 19, 2016
weierophinney added a commit that referenced this pull request Feb 19, 2016
weierophinney added a commit that referenced this pull request Feb 19, 2016
@weierophinney weierophinney deleted the hotfix/19 branch February 19, 2016 16:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant