Source: tests/api/unit/dto/CommentApiDtoTest.php · 174 lines, ~742 statements · namespace: (global) · `declare(strict_types=1)`: no
CommentApiDto Test
Unit tests for Scriptlog\Dto\Api\CommentApiDto.
The transform() output contract (verified against the implementation in lib/dto/api/CommentApiDto.php) emits: id, post_id, parent_id, author{name, email}, content, status, date. When the source row carries post context (post_title) a nested “post” object is added. CommentApiDto does not emit per-item _links nor a “replies” collection (nested replies are surfaced via the parent_id field).
| Mode | Target | Line |
|---|---|---|
require | require_once DIR . '/../../ApiTestCase.php'; | 17 |
require | require_once DIR . '/../../fixtures/ApiDataFixture.php'; | 18 |