====== tests/api/unit/ApiSearchControllerTest.php ====== **Source:** ''tests/api/unit/ApiSearchControllerTest.php'' · 186 lines, ~859 statements · namespace: //(global)// · `declare(strict_types=1)`: no ---- SearchApiController Test (named ApiSearchControllerTest) Unit tests for Scriptlog\Controller\Api\SearchApiController driven through the subprocess runner (ApiTestCase::runController). Controller actions terminate the process via ApiResponse::send(), so each action runs in an isolated PHP process against the seeded test database. Auth: the endpoint is public (requiresAuth=false at construction). Input is read from the $_GET superglobal, so query parameters are passed via the runner's "get" option rather than the action params. Naming note: the class is ApiSearchControllerTest (not SearchApiControllerTest) because tests/unit/SearchApiControllerTest.php already declares a global SearchApiControllerTest class; the recursive "Scriptlog Test Suite" in phpunit.xml would otherwise load two classes with the same name and fatal. ======= Includes ======= ^ Mode ^ Target ^ Line ^ | ''require'' | ''require_once __DIR__ . '/../ApiTestCase.php';'' | 23 | | ''require'' | ''require_once __DIR__ . '/../fixtures/ApiDataFixture.php';'' | 24 | ======= Types declared here ======= * [[scriptlog:tests:apisearchcontrollertest|ApiSearchControllerTest]] ---- //Generated by 'tools/gendoc'.//