Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

How to unit test?

How to unit test?

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

 

 

Reply
0 Replies

Suggested posts

Type a product name