-
Couldn't load subscription status.
- Fork 192
feat(other): integrate advanced search into saved searches module set #1738
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
base: master
Are you sure you want to change the base?
feat(other): integrate advanced search into saved searches module set #1738
Conversation
|
@IrAlfred thanks, it looks good but can you please add some unit/integration tests to cover the new functionality? |
77eebbe to
abce26c
Compare
abce26c to
afa4d24
Compare
| public function setUp(): void { | ||
| require_once __DIR__.'/../../bootstrap.php'; | ||
| require_once APP_PATH.'modules/core/modules.php'; | ||
| require_once APP_PATH.'modules/saved_searches/modules.php'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These three lines are inappropriately placed here. They should be part of the test suite bootstrap process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, bootstrap.php is included directly in the test classes. For now, I've kept it because otherwise we'd have to modify all these classes and each time we'd either run the tests with the --bootstrap=bootstrap.php flag or include it in the phpunit.xml configurations.
What do you suggest for this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I see. Well, that's a bit weird to include bootstrap over and over again. Bootstrapping processes is meant to be run only once when the test suite starts, it sets up everything and then the tests are executed. setUp class methods are meant to set up the environment for the tests defined in that file and shouldn't do global bootstrapping tasks. I suggest you make sure bootstrap.php is called ones, put it in phpunit.xml, remove run-time require statements and make sure the bootstrap process includes all modules and files, so we don't have to do random require statements here and there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do that in a separate PR as it's some kind of refactoring ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We won't merge this before the 2.5 release, so you have time to do it here. If you prefer, refactor in another branch and PR but then it will have conflicts as you will have to start from current master and you will end up having to resolve the conflicts.
afa4d24 to
c893f4b
Compare
c893f4b to
9d1500b
Compare
9d1500b to
169e1b4
Compare
Related issue #306