generate:api gives error and stops before creating phpunit.xml. Similarly generate:test gives a warning and the test suite name is pretruncated.#406
Merged
totten merged 1 commit intototten:masterfrom Jun 29, 2025
Conversation
Owner
|
Thanks, @demeritcowboy!
I can sort of reproduce this. Just noting that it seems to vary by the mix of CMS and subcommand.
Patch works better. 👍
Tangentially... |
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.
I made up the word pretruncated.
In #355 it added a use of
$ctx['fullName']to name the test suite, but it seems like maybe this never worked unless it was also building the info.xml at the same time as making phpunit.xml?This PR updates it to load it from the info since fullName never gets set.
e.g. At the time this was the code and you can see here fullName is never set:
civix/src/CRM/CivixBundle/Command/AddTestCommand.php
Lines 60 to 73 in fb21c7f
And in the current code the "generator" only has access to the "default ctx", and not this ctx, which also doesn't have fullName anyway:
civix/src/CRM/CivixBundle/Command/AddTestCommand.php
Lines 59 to 67 in b4c7e5f
civix/src/CRM/CivixBundle/Generator.php
Line 697 in b4c7e5f