<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to unit test? in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/How-to-unit-test/m-p/5193630#M2439</link>
    <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm stuck at getting the authorization code, and consequentially the access &amp;amp; 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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is where I'm stuck and what I wanna figure out how to do in the unit test class.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 24 Apr 2021 16:10:11 GMT</pubDate>
    <dc:creator>Rw11</dc:creator>
    <dc:date>2021-04-24T16:10:11Z</dc:date>
    <item>
      <title>How to unit test?</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/How-to-unit-test/m-p/5193630#M2439</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm stuck at getting the authorization code, and consequentially the access &amp;amp; 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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is where I'm stuck and what I wanna figure out how to do in the unit test class.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Apr 2021 16:10:11 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/How-to-unit-test/m-p/5193630#M2439</guid>
      <dc:creator>Rw11</dc:creator>
      <dc:date>2021-04-24T16:10:11Z</dc:date>
    </item>
  </channel>
</rss>

