Skip to content

test: pin console's ConsoleUIFormatter against the real catalogue - #6

Merged
imanimanyara merged 2 commits into
mainfrom
feat/formatter-catalogue-integration
Sep 28, 2026
Merged

imanimanyara merged 2 commits into
mainfrom
feat/formatter-catalogue-integration

Conversation

@imanimanyara

Copy link
Copy Markdown
Member

What

The other half of laranail/console#65. That PR gives ConsoleUIFormatter icon() and message() shortcodes, and they resolve through the EmojiCatalogue this package implements.

  • Test. ConsoleCatalogueTest gains a case against the real classes. It covers three things:
    • a catalogue-only name (unicorn) resolves;
    • console's own map still wins for cross;
    • ASCII falls back to :unicorn:.
  • Docs. The console-output recipe gets a styled example, and docs/tools/terminal.md gets a laranail/console section on how the two packages connect.
  • Cleanup. afterEach now also clears Capabilities::fake(), which is process-wide.

Why the test skips in CI for now

The formatter methods ship in console 0.1.4, which isn't tagged yet, so CI resolves v0.1.3 and the new case skips with its reason. The ^0.1.2 floor is deliberately unchanged, since nothing in src/ needs 0.1.4. Once console v0.1.4 is tagged, a re-run exercises the case for real.

Verification

  • Locally, against the console branch (console's classes loaded from the sibling checkout): 5 passed, 0 skipped in ConsoleCatalogueTest.
  • Against console v0.1.3: 336 passed, 1 skipped.
  • pint, phpstan, deptrac and rector all pass.

laranail/console 0.1.4 adds icon() and message() shortcodes to ConsoleUIFormatter, resolved through the EmojiCatalogue this package implements. Only here are both packages genuinely installed, so this is where the wiring is proven: catalogue-only names resolve, console's map wins for its own names, and ASCII falls back to the shortcode. Skips on console < 0.1.4, so the ^0.1.2 floor is unchanged. The suite now also clears Capabilities::fake() after each test.
Copilot AI lite review requested due to automatic review settings September 27, 2026 22:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@imanimanyara
imanimanyara merged commit b6b8797 into main Sep 28, 2026
15 checks passed
@imanimanyara
imanimanyara deleted the feat/formatter-catalogue-integration branch September 28, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants