Working state

This commit is contained in:
julien
2026-03-16 13:40:18 +01:00
parent dec76fa2c7
commit 557360dfde
57 changed files with 1044 additions and 1668 deletions

View File

@@ -7,8 +7,9 @@ use App\Category\Category;
use App\Category\CategoryController;
use App\Category\CategoryServiceInterface;
use App\Shared\Http\FlashServiceInterface;
use App\Shared\Pagination\PaginatedResult;
use PHPUnit\Framework\MockObject\MockObject;
use Tests\ControllerTestCase;
use Tests\ControllerTestBase;
/**
* Tests unitaires pour CategoryController.
@@ -18,7 +19,7 @@ use Tests\ControllerTestCase;
* suppression avec catégorie introuvable, succès et erreur métier.
*/
#[\PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations]
final class CategoryControllerTest extends ControllerTestCase
final class CategoryControllerTest extends ControllerTestBase
{
/** @var \Slim\Views\Twig&MockObject */
private \Slim\Views\Twig $view;
@@ -51,7 +52,7 @@ final class CategoryControllerTest extends ControllerTestCase
*/
public function testIndexRendersWithCategories(): void
{
$this->categoryService->method('findAll')->willReturn([]);
$this->categoryService->method('findPaginated')->willReturn(new PaginatedResult([], 0, 1, 20));
$this->view->expects($this->once())
->method('render')