TaskControllerTest.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /*
  3. * Copyright 2026 Alessandro Chiapparini <sprint_planer_web@chiapparini.org>
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License");
  7. * you may not use this file except in compliance with the License.
  8. * See the LICENSE file in the project root for the full license text.
  9. */
  10. declare(strict_types=1);
  11. namespace App\Tests\Controllers;
  12. use App\Controllers\TaskController;
  13. use PHPUnit\Framework\TestCase;
  14. /**
  15. * R01-N24 drift fence: TaskController shares the SprintController batch
  16. * cap. A bump in the constant has memory / DB-pressure implications under
  17. * attacker load — REVIEW_01.md §R01-N24 must move with it.
  18. */
  19. final class TaskControllerTest extends TestCase
  20. {
  21. public function testMaxBatchItemsConstantMatchesSprintController(): void
  22. {
  23. $this->assertSame(5000, TaskController::MAX_BATCH_ITEMS);
  24. // The two controllers cap independently but the audit suggested
  25. // a single bound; assert they have not drifted apart.
  26. $this->assertSame(
  27. \App\Controllers\SprintController::MAX_BATCH_ITEMS,
  28. TaskController::MAX_BATCH_ITEMS,
  29. );
  30. }
  31. }