In simplifying parts of App\Services\Twitter\TwitterService, it seems I inadvertently broke a few tests. These tests now directly depend on there being a token already. I've temporarily copied some code into multiple test cases to fix them, but this isn't a good permanent solution.
Maybe this can be solved with helper functions for 2 specific scenarios:
tests that fake connecting to the token API endpoint
tests that need a token already existing in the DB
The following test cases currently depend on there being a token saved in DB storage:
'creates an instance of App\Services\Twitter\TwitterService'
'throws an exception if requested tweet count is < 1'
'throws an exception if requested tweet count is > 3200'
'processes a response from the twitter api user timeline endpoint
In simplifying parts of
App\Services\Twitter\TwitterService
, it seems I inadvertently broke a few tests. These tests now directly depend on there being a token already. I've temporarily copied some code into multiple test cases to fix them, but this isn't a good permanent solution.Maybe this can be solved with helper functions for 2 specific scenarios:
The following test cases currently depend on there being a token saved in DB storage: