Cover the command registry, the backup prompt and two grid branches - #721
Merged
Conversation
The CLI registry is the whole sp:* command list; an entry dropped from it
disappears from the command line with nothing else anywhere to catch it, so it
is asserted as the exact list, in order.
Plus the backup command's interactive path prompt, and two branches of the grid
every management screen renders through: updating the pager when there is none
attached is a no-op rather than a failure, and the template check's success
path, which only had its failure covered.
Two things left alone deliberately: the backup's not-installed guard sits behind
!defined('TEST_ROOT'), which the suite defines for the whole process, and the
XML export's three catch blocks around DOMDocument cannot be reached through any
input — the document is built internally, and invalid text is sanitised by the
extension rather than raising.
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
4 tests on the last small gaps in the CLI and grid plumbing.
CliCommandHelper::getCommands()is the wholesp:*list. An entry dropped from it disappears from the command line with nothing else anywhere to catch it, so it is asserted as the exact list, in order.Left alone deliberately
!defined('TEST_ROOT'), which the suite defines for the whole process — structurally unreachable from any test in it.catchblocks aroundDOMDocumentcannot be reached through any input: the document is built internally, and invalid text content is sanitised by ext-dom rather than raising. Confirmed experimentally rather than assumed.$tableTemplateproperty that has no setter anywhere in the codebase.One defect found, fixed separately
XmlExport::export()deletes the previous export before writing the new one, so a run that fails part-way destroys the last good export rather than leaving it in place.BackupFile::doBackup()has the same ordering. That is its own change.Testing
Unit: 13 green across the touched classes. Integration: 6 green on the backup command.