File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,22 @@ public function testFetchCuratedPodcastsListById(): void
137137 $ this ->assertSame ( $ arrUrl ['path ' ], '/api/v2/curated_podcasts/ ' . $ arrOptions ['id ' ] );
138138 }
139139
140+ public function testFetchCuratedPodcastsLists (): void
141+ {
142+ $ objClient = $ this ->podcastApiClient ;
143+ $ arrOptions = [ 'page ' => '3 ' ];
144+ $ strResponse = $ objClient ->fetchCuratedPodcastsLists ( $ arrOptions );
145+ $ objResponse = json_decode ( $ strResponse );
146+
147+ $ this ->assertObjectHasAttribute ( 'curated_lists ' , $ objResponse );
148+ $ this ->assertGreaterThan ( 0 , count ( $ objResponse ->curated_lists ) );
149+ $ this ->assertSame ( $ objClient ->getMethod (), 'GET ' );
150+ $ arrUrl = parse_url ( $ objClient ->getUri () );
151+ $ this ->assertSame ( $ arrUrl ['path ' ], '/api/v2/curated_podcasts ' );
152+ parse_str ( $ arrUrl ['query ' ], $ arrQuery );
153+ $ this ->assertSame ( $ arrQuery ['page ' ], $ arrOptions ['page ' ] );
154+ }
155+
140156 public function testBatchFetchPodcasts (): void
141157 {
142158 $ objClient = $ this ->podcastApiClient ;
You can’t perform that action at this time.
0 commit comments