Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev/core#2823 fix test to be more like real function usage #21440

Merged
merged 1 commit into from
Sep 12, 2021

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

dev/core#2823 fix test to be more like real function usage

Before

The construct function on ManagedEntities takes 2 parameters :

$modules
$declarations

Outside of tests there is no variation in the values of these ie they are always launched from the singleton

image

Which always passes 'allModules' and NULL

image

Ergo the variables only exist to support tests

After

The second variable is removed - tests now emulate the 'real world' scenario of using a hook to declare 'managed'

We also get rid of the silly variable name 'decls'

Technical Details

I expect that it's fairly tricky to mock the modules being installed via the tests & hence the first variable probably makes sense & led to the second which seems to just add confusion

Comments

@civibot
Copy link

civibot bot commented Sep 12, 2021

(Standard links)

@colemanw
Copy link
Member

Cool. Tests are happy, lets see if it fixes the failing Afform tests.

@colemanw colemanw merged commit 86fabfe into civicrm:master Sep 12, 2021
@eileenmcnaughton eileenmcnaughton deleted the mgd_test branch September 12, 2021 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants