public function testSignerLinks()
    {
        $response = <<<EOS
\t\t\t<document>
\t\t\t\t<signer-links>
\t\t\t\t\t<signer-link>
\t\t\t\t\t\t<name>John Employee</name>
\t\t\t\t\t\t<role>Signer</role>
\t\t\t\t\t\t<signer-token>bg995X011CqtY44L</signer-token>
\t\t\t\t\t</signer-link>
\t\t\t\t\t<signer-link>
\t\t\t\t\t\t<name>Susan Employee</name>
\t\t\t\t\t\t<role>Signer</role>
\t\t\t\t\t\t<signer-token>ad8XC0013d77d88X</signer-token>
\t\t\t\t\t</signer-link>
\t\t\t\t</signer-links>
\t\t\t</document>
EOS;
        $client = \Mockery::mock('client');
        $client->shouldReceive('get')->with('/api/documents/1234/signer_links.xml')->andReturn($response);
        Document::signerLinks($client, '1234');
        $client = \Mockery::mock('client');
        $client->shouldReceive('get')->with(sprintf('/api/documents/1234/signer_links.xml?redirect_location=%s', urlencode('http://example.com/')))->andReturn($response);
        Document::signerLinks($client, '1234', 'http://example.com/');
        $client = \Mockery::mock('client');
        $client->shouldReceive('get')->andReturn($response);
        $signerLinks = Document::signerLinks($client, '1234');
        $this->assertEquals('John Employee', $signerLinks[0]->name);
        $this->assertEquals('ad8XC0013d77d88X', $signerLinks[1]->signer_token);
    }
 /**
  * Generates signer links (used to generate embedded signing widgets)
  * via the Signer Links call (undocumented on RightSignature website).
  *
  * @param string $documentGuid sent document GUID
  * @param string $returnUrl    option URL to redirect user to after signing
  *
  * @return RightSignature\SignerLinks
  */
 public function signerLinks($documentGuid, $returnUrl = null)
 {
     return Document::signerLinks($this->_client, $documentGuid, $returnUrl);
 }