Lcobucci\JWT\Signer\EcdsaTest::createHashShouldReturnAHashUsingPrivateKey PHP Method

createHashShouldReturnAHashUsingPrivateKey() public method

    public function createHashShouldReturnAHashUsingPrivateKey()
    {
        $signer = $this->getSigner();
        $key = new Key('testing');
        $privateKey = $this->createMock(PrivateKeyInterface::class);
        $signingHash = gmp_init(10, 10);
        $this->keyParser->expects($this->once())->method('getPrivateKey')->with($key)->willReturn($privateKey);
        $this->adapter->expects($this->once())->method('createSigningHash')->with('testing', 'sha256')->willReturn($signingHash);
        $this->adapter->expects($this->once())->method('createHash')->with($privateKey, $signingHash)->willReturn('string');
        self::assertInternalType('string', $signer->createHash('testing', $key));
    }