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

Tests are useless #37

Open
manjencic opened this issue Mar 5, 2014 · 0 comments
Open

Tests are useless #37

manjencic opened this issue Mar 5, 2014 · 0 comments

Comments

@manjencic
Copy link

You shouldn't use real data in your tests because it depends on their existence in database which you are not going to test. In InstagramTest.php you test a lot of functions using access_token (which is of course now expired) and that mean you test Instagram too, which is not your business. What if Instagram is down for a moment or real data you use doesn't exists any more (like access_token) and run your tests? Your tests will fail but it is not because your code is wrong.

Instead of that, tests should deal with mock objects and tests only your code separated from third parties because, in this case, we expect that Instagram API works well. That is not our business, we want to take care about our code only.

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

No branches or pull requests

1 participant