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 PostRepositoryTest extends TestCase
|
||||
{
|
||||
/** @var PDO&MockObject */
|
||||
@@ -339,7 +340,7 @@ final class PostRepositoryTest extends TestCase
|
||||
$post = Post::fromArray($this->rowPost);
|
||||
$stmt = $this->stmtForWrite();
|
||||
|
||||
$this->db->method('prepare')
|
||||
$this->db->expects($this->once())->method('prepare')
|
||||
->with($this->stringContains('INSERT INTO posts'))
|
||||
->willReturn($stmt);
|
||||
|
||||
@@ -403,7 +404,7 @@ final class PostRepositoryTest extends TestCase
|
||||
$post = Post::fromArray($this->rowPost);
|
||||
$stmt = $this->stmtForWrite(1);
|
||||
|
||||
$this->db->method('prepare')
|
||||
$this->db->expects($this->once())->method('prepare')
|
||||
->with($this->stringContains('UPDATE posts'))
|
||||
->willReturn($stmt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user