Working state but no uploads
This commit is contained in:
@@ -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 UserRepositoryTest extends TestCase
|
||||
{
|
||||
/** @var PDO&MockObject */
|
||||
@@ -258,7 +259,7 @@ final class UserRepositoryTest extends TestCase
|
||||
$user = User::fromArray($this->rowAlice);
|
||||
$stmt = $this->stmtForWrite();
|
||||
|
||||
$this->db->method('prepare')
|
||||
$this->db->expects($this->once())->method('prepare')
|
||||
->with($this->stringContains('INSERT INTO users'))
|
||||
->willReturn($stmt);
|
||||
|
||||
@@ -301,7 +302,7 @@ final class UserRepositoryTest extends TestCase
|
||||
$newHash = password_hash('nouveaumdp', PASSWORD_BCRYPT);
|
||||
$stmt = $this->stmtForWrite();
|
||||
|
||||
$this->db->method('prepare')
|
||||
$this->db->expects($this->once())->method('prepare')
|
||||
->with($this->stringContains('UPDATE users'))
|
||||
->willReturn($stmt);
|
||||
|
||||
@@ -322,7 +323,7 @@ final class UserRepositoryTest extends TestCase
|
||||
{
|
||||
$stmt = $this->stmtForWrite();
|
||||
|
||||
$this->db->method('prepare')
|
||||
$this->db->expects($this->once())->method('prepare')
|
||||
->with($this->stringContains('UPDATE users'))
|
||||
->willReturn($stmt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user