TASK: Stabilise pure dbal repository truncations during behat tests #5673
+9
−15
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.
These repositories are listed (correctly) in
which causes doctrine to ignore them when creating new migrations for new entities.
Also the FlowEntities trait for doctrine in behat use does not truncate these tables as they are foreign matter.
Now previously we uses the php apis of the respective repositories to empty the tables but the apis require the CR-Id to be handed in.
We can get a hold of the tested CR by using
$alreadySetUpContentRepositories- checking the CR-Registry for available CRs would be wrong as one can dynamically define a CR in testing. This dynamic definition of a CR will only happen after the first Scenario is run. Before$alreadySetUpContentRepositorieswould be empty. This means that when running a first behat test which uses the WorkspaceService the test will likely fail as the database still contains values.Upgrade instructions
Review instructions
Checklist
FEATURE|TASK|BUGFIX!!!and have upgrade-instructions