Table of Contents
tests/api/unit/ArchivesApiControllerTest.php
Source: tests/api/unit/ArchivesApiControllerTest.php · 157 lines, ~752 statements · namespace: (global) · `declare(strict_types=1)`: no
ArchivesApiController Test
Unit tests for Scriptlog\Controller\Api\ArchivesApiController 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: all archive endpoints are public (requiresAuth=false at construction).
The fixture seeds two published blog posts dated today, so the archive index contains a single year/month bucket with post_count 2 (the static page is excluded from the archive index).
Includes
| Mode | Target | Line |
|---|---|---|
require | require_once DIR . '/../ApiTestCase.php'; | 19 |
require | require_once DIR . '/../fixtures/ApiDataFixture.php'; | 20 |
