/** * Accessor method for setting a preconfigured signature which will set the other * properties from the data contained in the signature * * @param HmacSha1 $signature */ public function setSignature(HmacSha1 $signature) { $this->signature = $signature; $this->resourceUrl = $signature->getResourceURL(); $this->httpMethod = $signature->getHttpMethod(); $this->nonce = $signature->getNonce(); $this->timestamp = $signature->getTimestamp(); $this->verifier = $signature->getVerifier(); $this->postFields = $signature->getPostFields(); }
/** * @test * Test to ensure the nonce is being set correctly */ public function generateNonce() { $nonce = $this->signature->getNonce(); $this->assertNotEmpty($nonce); }