Table of Contents

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'.