function let(HashGenerator $hashGenerator) { $hashGenerator->generate(a::any(), a::any())->willReturn($this->hash); $this->beConstructedWith($hashGenerator); }
/** * @param string $hashAlgorithm * @return string */ protected function generateHash($hashAlgorithm) { $base = $this->getHashBase(); return $this->hashGenerator->generate($hashAlgorithm, $base); }