Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:tests:languagesapicontrollertest

This is an old revision of the document!


tests/api/unit/LanguagesApiControllerTest.php

Source: tests/api/unit/LanguagesApiControllerTest.php · 249 lines, ~1082 statements · namespace: (global) · `declare(strict_types=1)`: no


LanguagesApiController Test

Unit tests for Scriptlog\Controller\Api\LanguagesApiController 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: index/show/default are public (requiresAuth=false at construction); store/update/destroy/setDefault require an administrator.

Note: this controller routes by language code ('code' param), not numeric ID, and its write actions are admin-only. update()/destroy()/setDefault() return 200 (not 204) on success.

Includes

^ Mode ^ Target ^ Line ^
| ''require'' | ''require_once __DIR__ . '/../ApiTestCase.php';'' | 20 |
| ''require'' | ''require_once __DIR__ . '/../fixtures/ApiDataFixture.php';'' | 21 |

Types declared here


Generated by 'tools/gendoc'.

scriptlog/tests/languagesapicontrollertest.1790413764.txt.gz · Last modified: by admin