Working state but no uploads

This commit is contained in:
julien
2026-03-16 02:33:18 +01:00
parent cc3fbdc830
commit 55d2da9f2f
52 changed files with 121 additions and 49 deletions

View File

@@ -19,6 +19,7 @@ use PHPUnit\Framework\TestCase;
* PDO et PDOStatement sont mockés pour isoler complètement
* le dépôt de la base de données.
*/
#[\PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations]
final class PasswordResetRepositoryTest extends TestCase
{
/** @var PDO&MockObject */
@@ -60,7 +61,7 @@ final class PasswordResetRepositoryTest extends TestCase
$expiresAt = date('Y-m-d H:i:s', time() + 3600);
$stmt = $this->stmtOk();
$this->db->method('prepare')
$this->db->expects($this->once())->method('prepare')
->with($this->stringContains('INSERT INTO password_resets'))
->willReturn($stmt);
@@ -162,7 +163,7 @@ final class PasswordResetRepositoryTest extends TestCase
$userId = 42;
$stmt = $this->stmtOk();
$this->db->method('prepare')
$this->db->expects($this->once())->method('prepare')
->with($this->stringContains('UPDATE password_resets'))
->willReturn($stmt);
@@ -200,7 +201,7 @@ final class PasswordResetRepositoryTest extends TestCase
public function testInvalidateByUserIdNeverCallsDelete(): void
{
$stmt = $this->stmtOk();
$this->db->method('prepare')
$this->db->expects($this->once())->method('prepare')
->with($this->stringContains('UPDATE'))
->willReturn($stmt);