Add a test for the basic user auth

This commit is contained in:
Dave Smith-Hayes 2024-05-25 22:55:47 -04:00
parent 4548d67eac
commit 5a86bb3579

View File

@ -0,0 +1,16 @@
<?php
namespace Slovocast\Tests\Infrastructure\User;
use Slovocast\Tests\TestCase;
use Slovocast\Infrastructure\User\BasicUserAuthorization;
class BasicAuthorizationTest extends TestCase
{
public function testPasswordVerify(): void
{
$basicAuth = new BasicUserAuthorization();
$hashedPassword = $basicAuth->hash("hello");
$this->assertTrue($basicAuth->verify("hello", $hashedPassword));
}
}