Repository navigation
test: pin console's ConsoleUIFormatter against the real catalogue - #6
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The other half of laranail/console#65. That PR gives
ConsoleUIFormattericon()andmessage()shortcodes, and they resolve through theEmojiCataloguethis package implements.ConsoleCatalogueTestgains a case against the real classes. It covers three things:unicorn) resolves;cross;:unicorn:.docs/tools/terminal.mdgets a laranail/console section on how the two packages connect.afterEachnow also clearsCapabilities::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.2floor is deliberately unchanged, since nothing insrc/needs 0.1.4. Once console v0.1.4 is tagged, a re-run exercises the case for real.Verification
ConsoleCatalogueTest.pint,phpstan,deptracandrectorall pass.