You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: