How to unit test?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm making a small SDK (PHP), and I want to write some unit tests for the authorization, but also for the web api endpoints.
I'm stuck at getting the authorization code, and consequentially the access & refresh tokens. I have all my secrets in my test class but I can't figure out the "fetch access token" request. Right now the SDK generates the url and returns it, and the frontend makes a request there, interacts with the Spotify prompt and gets redirected back with the authorization code.
The frontend then makes a request to the backend with the authorization code and the backend calls the "fetch access token" method from the SDK.
This is where I'm stuck and what I wanna figure out how to do in the unit test class.
Thank you in advance
Labels:
- Labels:
-
Discussion
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page