-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
feature/test-doublesTest Stubs and Mock ObjectsTest Stubs and Mock Objectstype/refactoringA refactoring that should be applied to make the code easier to understand and maintainA refactoring that should be applied to make the code easier to understand and maintain
Milestone
Description
The implementation of the method method() of test test double API currently looks like this:
public function method(Constraint|PropertyHook|string $constraint): InvocationStubber
{
return $this
->__phpunit_getInvocationHandler()
->expects(new AnyInvokedCount)
->method($constraint);
}This means that the expects() method is called internally even for a test stub.
This is a remnant from the past when test stubs and mock objects were not as strictly separated as they are today.
We should explore whether we can refactor the runtime internals of the test stub functionality so that it does not require this, in an effort to further separate test stubs from mock objects.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature/test-doublesTest Stubs and Mock ObjectsTest Stubs and Mock Objectstype/refactoringA refactoring that should be applied to make the code easier to understand and maintainA refactoring that should be applied to make the code easier to understand and maintain