Skip to content
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

Implement ObjectMethod dispatcher. #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

shulard
Copy link
Contributor

@shulard shulard commented May 31, 2016

Hello !

I've worked on the #16 issue about ObjectMethod dispatcher. I tried to use only the object logic inside the Basic dispatcher combined with the refactored ClassMethod.

For the moment it's a first step but there is a lot of duplicated code between the different dispatchers (parameters retrieving, ClassMethod vs ObjectMethod...). I think that we'll discuss about a refactoring when the dispatcher split will be done.

@Hywan
Copy link
Member

Hywan commented Jun 6, 2016

Is it ready for a review?

@shulard
Copy link
Contributor Author

shulard commented Jun 6, 2016

I think it is ! Based on the current ClassMethod implementation it introduce the same behaviour but on a given object only...

@shulard
Copy link
Contributor Author

shulard commented Dec 13, 2016

Same here, I've rebased on master 😄.

Allow to dispatch route on an already constructed object.
@coveralls
Copy link

coveralls commented Oct 3, 2017

Coverage Status

Coverage increased (+0.5%) to 95.302% when pulling a3b3fe8 on shulard:feature/issue-16 into 2b1c300 on hoaproject:master.

@shulard
Copy link
Contributor Author

shulard commented Oct 3, 2017

Hello @Hywan,

I've rebased my code on master, for me the implementation is done. I've one question about custom object logic during tests.
I've created specific classes in the ObjectMethod.php test file : ObjectMethod_MockObject, ObjectMethod_MockKit, ObjectMethod_MockRouter.

I know that I can mock Router and Kit relatively easily but the ObjectMethod_MockObject must exists during the test phase. It's a custom object used during dispatcher process and I can't add methods on a mock object.

Is there a cleaner way to handle that ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants