public function testProjectAccess()
 {
     $writer = $this->client->getWriter(FUNCTIONAL_WRITER_ID);
     $this->assertArrayHasKey('gd', $writer);
     $this->assertArrayHasKey('pid', $writer['gd']);
     try {
         $this->client->disableProjectAccess(FUNCTIONAL_WRITER_ID, $writer['gd']['pid']);
     } catch (ClientErrorResponseException $e) {
     }
     try {
         $this->client->getProjectAccess(FUNCTIONAL_WRITER_ID, $writer['gd']['pid']);
         $this->fail();
     } catch (ClientErrorResponseException $e) {
     }
     $this->client->enableProjectAccess(FUNCTIONAL_WRITER_ID, $writer['gd']['pid']);
     $result = $this->client->getProjectAccess(FUNCTIONAL_WRITER_ID, $writer['gd']['pid']);
     $this->assertNotEmpty($result);
     $this->assertStringStartsWith('https://secure.gooddata.com/', $result);
     $this->assertStringEndsNotWith('#/info/ssoFailed', $result);
     $this->client->disableProjectAccess(FUNCTIONAL_WRITER_ID, $writer['gd']['pid']);
     try {
         $this->client->getProjectAccess(FUNCTIONAL_WRITER_ID, $writer['gd']['pid']);
         $this->fail();
     } catch (ClientErrorResponseException $e) {
     }
 }