18 lines
335 B
PHP
18 lines
335 B
PHP
<?php
|
|
|
|
namespace Tests\Fakes;
|
|
|
|
use App\Auth\PasswordHasher;
|
|
|
|
class FakeHasher implements PasswordHasher
|
|
{
|
|
public function hash(string $password): string
|
|
{
|
|
return 'hashed-' . $password;
|
|
}
|
|
|
|
public function verify(string $password, string $hash): bool
|
|
{
|
|
return $hash === 'hashed-' . $password;
|
|
}
|
|
}
|