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

Add nicer tests #4

Open
joestrong opened this issue Oct 11, 2017 · 3 comments
Open

Add nicer tests #4

joestrong opened this issue Oct 11, 2017 · 3 comments

Comments

@joestrong
Copy link
Owner

joestrong commented Oct 11, 2017

The current tests aren't doing much

Mainly the API endpoint needs to be mocked so the endpoint isn't a part of the test

I'm happy for phpspec to be replaced by phpunit etc

@royalmitten
Copy link

Will look into this over the weekend!
We should be able to do this with the current PHPSpec implementation, or do you prefer using PHPUnit?

@joestrong
Copy link
Owner Author

@royalmitten I just started adding more tests with phpspec, so I'm happy to stick with that now. Also I've started using Guzzle's mocking tools to mock the API endpoints.

Any additional tests, or changes to the tests are welcome. I think the code should be throwing its own exceptions instead of Guzzle exceptions, so I think that could be a good improvement to the code and the tests.

@mannion007
Copy link

PR here #20

Refactored some code to decouple from Guzzle, making testing with phpspec much cleaner. In the future you could easily add integration tests that do use the RetroAchievements adapter to make real requests if you want to.

That's my last PR for Hacktoberfest =)

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