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

Hard to unit test code using this package #40

Open
tanigami opened this issue Oct 8, 2016 · 2 comments
Open

Hard to unit test code using this package #40

tanigami opened this issue Oct 8, 2016 · 2 comments

Comments

@tanigami
Copy link

tanigami commented Oct 8, 2016

Seems it's required to call static methods to work with this library, which makes it so hard to unit test. Classes are instantiated through their super classes and so they cannot be DI'd from outside straightforward. Wouldn't be very important for billing related libraries like this to be more test-friendly?

@guzzilar
Copy link
Contributor

guzzilar commented Dec 1, 2016

Hi, @tanigami

Thank you for your input. Currently I'm working on a new Omise-PHP version, I would consider about this issue also.

However, please feel free If you have any idea on this to input more.

Fyi, I would like to add a Type: Discussion label to this topic that we could have more conversation on this further 🙂.

@iwat
Copy link

iwat commented Mar 30, 2017

@tanigami you may need to visit AspectMock, they provide static method mocking which can be a workaround while waiting for a new version.

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

No branches or pull requests

3 participants