コード例 #1
0
 /**
  * @test
  * @dataProvider provideSha512Request
  */
 public function Sha512StringIsComposedCorrectly(PassPhrase $passphrase, array $request, $expectedSha)
 {
     $composer = new AllParametersShaComposer($passphrase, new HashAlgorithm(HashAlgorithm::HASH_SHA512));
     $composer->addParameterFilter(new ShaOutParameterFilter());
     $this->assertEquals($expectedSha, $composer->compose($request));
 }
コード例 #2
0
 /**
  * @test
  */
 public function CreateAliasInvalid()
 {
     $passphraseOut = new Passphrase(PASSPHRASE_SHA_OUT);
     $shaOutComposer = new AllParametersShaComposer($passphraseOut);
     $shaOutComposer->addParameterFilter(new ShaOutParameterFilter());
     $createAliasResponse = $this->provideAliasResponse(true, true);
     $this->assertTrue($createAliasResponse->isValid($shaOutComposer));
     $this->assertFalse($createAliasResponse->isSuccessful());
 }