-
Notifications
You must be signed in to change notification settings - Fork 196
[test] Add helpers for deal with ContainerInterface mock #195
Conversation
/** | ||
* Helper methods for mock Interop\Container\ContainerInterface. | ||
*/ | ||
trait ContainerTrait |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nikolaposa ping
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Maks3w 👍
@Maks3w When will this be merged? :) |
@@ -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)) { |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 :)
@Maks3w Looks good; let me know when you've pushed the changes to the method name. |
@weierophinney Done. Waiting checks to complete. I've changed the method description too 0a82f3f#diff-706505189b1c9065d474fd9df5b59f64R37 |
[test] Add helpers for deal with ContainerInterface mock
This PR is on top of #194