/** * @expectedException \RuntimeException * @expectedExceptionMessage The certificate private key cannot be fetched. */ public function testGenerateWithInvalidPrivateCertificate() { if (!extension_loaded('openssl')) { $this->markTestSkipped('The open ssl extension is required to process OAuth rsa sha1 signature tests.'); } $this->signature->expects($this->once())->method('getPrivateCertificate')->will($this->returnValue('foo')); $this->signature->generate($this->request, 'consumer_secret'); }
public function testGenarateWithOAuthToken() { $signature = $this->signature->generate($this->request, 'consumer_secret', 'token_secret'); $this->assertSame('consumer_secret&token_secret', $signature); }