-
Notifications
You must be signed in to change notification settings - Fork 8
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
Improvements and handle Google errors #10
Conversation
throw new Exception\BackendException; | ||
} | ||
} | ||
} |
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.
how about using a trait instead ?
Instead of And the |
Fortunately, we are in the Google adapter... |
@Taluu For the second point, maybe handleErrors is a bad name, this is more an |
@Taluu Open for review. (I'll rebase and change the name of some commits :p) |
@@ -33,6 +28,8 @@ | |||
*/ | |||
class CalendarApi implements CalendarApiInterface, AclInterface | |||
{ | |||
use ResponseHandler; |
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.
👍
f51ae1a
to
82d3644
Compare
@Taluu I think i'm done with this one. |
[500, 'Backend Error', Exception\BackendException::class], | ||
]; | ||
} | ||
} |
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.
instead of making a blank mock Api
class, what you can do is using a mock that use the trait with $this->getMockForTrait()
: https://phpunit.de/manual/current/en/test-doubles.html#test-doubles.mocking-traits-and-abstract-classes
Please keep in mind we're on php 5.4 >, not php 5.5 (so no |
This looks good though, so just replace the |
@Taluu done |
@Taluu I fixed the php 5.4 stuffs |
🎉 |
Related to Calendart/CalendArt#6