Ejemplo n.º 1
0
 /**
  * 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();
 }
Ejemplo n.º 2
0
 /**
  * @test
  *
  * Ensure Post Fields can be retrieved
  */
 public function ensurePostFieldsCanBeRetrieved()
 {
     $postFields = ['name' => 'Matt Frost'];
     $this->signature->setPostFields($postFields);
     $this->assertEquals($postFields, $this->signature->getPostFields());
 }