-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
4.x Remove Pimple #2587
4.x Remove Pimple #2587
Conversation
312dfe4
to
b1cb7c7
Compare
@@ -39,8 +37,7 @@ public static function setupBeforeClass() | |||
|
|||
public function testGetContainer() | |||
{ | |||
$pimple = new Pimple(); | |||
$container = new Psr11Container($pimple); | |||
$container = new MockContainer(); |
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.
Why have a MockContainer
object when we could be using PHPUnit's createMock()
?
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.
We need to have ArrayAccess implemented on the class unless you want to force usage of the ContainerInterface::set()
method
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.
We need to have ArrayAccess implemented on the class
Why? Slim doesn't set anything into the container anymore does it?
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 misread your question. We can mock a container for that specific test sure. We have a MockContainer though so why not use it
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.
Why do we have a MockContainer
though? We shouldn't need it as we should be able to use PHPUnit's Mocking functionality for every situation where Slim's classes use a container. If we can't then we need to look at that particular Slim code.
Will refactor with Mocks instead and re-open. |
Removing Pimple as per discussion in #2585.