Add getters for private vars of acceptance test traits #32347
Merged
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.
Description
Provide getters for all the "useful/interesting" private variables in the
FeatureContext
traits, so that apps that care can find out the results ofFeatureContext
actions without being forced touse BasicStructure
trait.Motivation and Context
App acceptance tests want to add their own new step definitions/methods. Those want to use some of the methods available in core. For example,
runOcc()
, which remembers internally theocc
command exit status,StdOut
andStdErr
text. There are some core methods that process those looking for strings etc. But if the app needs to parse the output in some special way unique to the app, then it needs to be able to get the "raw"StdOut
.Currently to do this, the app does
use BasicStructure
in its ownAppContext.php
- giving it a "private" view of all the methods and variables that would normally appear in coreFeatureContext
. But that runs into trouble if the app needs to also refer to other core contexts likeFederationContext
.FederationContext
itself makes use ofFeatureContext
, which forces the app to also includeFeatureContext
in its list of contexts. ButFeatureContext
also doesuse BasicStructure
- this results in duplicate step definitions.How Has This Been Tested?
CI
Types of changes
Checklist:
Open tasks: