/** * @param $password * * @return string|\Testing\Generator\string */ private function mockPasswordHashing($password) { $mockHash = $this->generator()->anyString(); $this->hasher->shouldReceive('make')->with($password)->andReturn($mockHash); return $mockHash; }