TaskControllerTest.php 845 B

123456789101112131415161718192021222324252627
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Tests\Controllers;
  4. use App\Controllers\TaskController;
  5. use PHPUnit\Framework\TestCase;
  6. /**
  7. * R01-N24 drift fence: TaskController shares the SprintController batch
  8. * cap. A bump in the constant has memory / DB-pressure implications under
  9. * attacker load — REVIEW_01.md §R01-N24 must move with it.
  10. */
  11. final class TaskControllerTest extends TestCase
  12. {
  13. public function testMaxBatchItemsConstantMatchesSprintController(): void
  14. {
  15. $this->assertSame(5000, TaskController::MAX_BATCH_ITEMS);
  16. // The two controllers cap independently but the audit suggested
  17. // a single bound; assert they have not drifted apart.
  18. $this->assertSame(
  19. \App\Controllers\SprintController::MAX_BATCH_ITEMS,
  20. TaskController::MAX_BATCH_ITEMS,
  21. );
  22. }
  23. }