Example #1
0
 /**
  * @testdox Calling getTrack anonymously returns an array with track details.
  * @medium
  * @group integration
  */
 public function testGetTrackAnonymous()
 {
     if (isset($this->mock)) {
         $this->mock->addResponse(new Response(200, ['Content-type' => 'application/json'], Stream::factory(json_encode(['kind' => 'track']))));
     }
     $trackId = getenv('track_id');
     $result = $this->soundcloud->getTrack($trackId);
     $this->assertTrue(is_array($result));
     $this->assertTrue(array_key_exists('kind', $result));
     $this->assertEquals('track', $result['kind']);
 }