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

[test] Add helpers for deal with ContainerInterface mock #195

Merged
merged 2 commits into from
Nov 24, 2015
Merged

[test] Add helpers for deal with ContainerInterface mock #195

merged 2 commits into from
Nov 24, 2015

Conversation

Maks3w
Copy link
Member

@Maks3w Maks3w commented Nov 23, 2015

This PR is on top of #194

/**
* Helper methods for mock Interop\Container\ContainerInterface.
*/
trait ContainerTrait
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

@Maks3w 👍

@nikolaposa
Copy link
Contributor

@Maks3w When will this be merged? :)

@weierophinney weierophinney added this to the 1.0.0rc3 milestone Nov 23, 2015
@weierophinney weierophinney self-assigned this Nov 23, 2015
@@ -201,13 +201,13 @@ public function pipe($path, $middleware = null)
{
// Lazy-load middleware from the container when possible
$container = $this->container;
if (null === $middleware && is_string($path) && $container && $container->has($path, true)) {
if (null === $middleware && is_string($path) && $container && $container->has($path)) {
Copy link
Member

Choose a reason for hiding this comment

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

Noting for posterity: The boolean true argument existed because an earlier revision of zend-servicemanager for v3 defined it; when provided, it indicated whether or not to look in abstract factories when performing the check. We have since removed that flag in zend-servicemanager's develop branch as it violates the LSP, but also because it was leading to many subtle errors (it was far too easy to forget to add it, and have a false negative lookup).

Copy link
Member Author

Choose a reason for hiding this comment

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

This change has be done on #194. This PR is on top of that one for prevent merge conflicts.

Copy link
Member

Choose a reason for hiding this comment

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

There's nothing to change, @Maks3w ; I made the comment in case somebody wonders what the purpose of that change was. The change is fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

I know. :) Just the comment was better located on that PR :)

@weierophinney
Copy link
Member

@Maks3w Looks good; let me know when you've pushed the changes to the method name.

@Maks3w
Copy link
Member Author

Maks3w commented Nov 23, 2015

@weierophinney Done. Waiting checks to complete. I've changed the method description too 0a82f3f#diff-706505189b1c9065d474fd9df5b59f64R37

weierophinney added a commit that referenced this pull request Nov 24, 2015
[test] Add helpers for deal with ContainerInterface mock
@weierophinney weierophinney merged commit 0a82f3f into zendframework:master Nov 24, 2015
weierophinney added a commit that referenced this pull request Nov 24, 2015
weierophinney added a commit that referenced this pull request Nov 24, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants