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

Adding a Installation_Manager to facilitate installation #302

Merged
merged 3 commits into from
Jul 28, 2022

Conversation

srtfisher
Copy link
Member

@srtfisher srtfisher commented Jul 27, 2022

Adds an installation manager to allow folks to fluently install the Mantle Testing Framework and define before/after hooks.

Previously

Mantle\Testing\install(
	function() {
		tests_add_filter( 'muplugins_loaded', '_manually_load_environment' );
	}
);

New

Mantle\Testing\manager()
	->before( ... )
	->after( ... )
	->loaded( ... )
	->install();

I've also combined the logic of mantle_after_wordpress_install to this manager (it's a singleton) but the logic of mantle_after_wordpress_install will still continue to exist.

Copy link
Contributor

@anubisthejackle anubisthejackle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I like the fluent API. Added a suggestion for passing $accepted_args but that's all I can see.

src/mantle/testing/class-installation-manager.php Outdated Show resolved Hide resolved
Co-authored-by: Travis Weston <anubisthejackle@users.noreply.github.com>
@srtfisher srtfisher merged commit 5bb8dd7 into main Jul 28, 2022
@srtfisher srtfisher deleted the install-ui-improvements branch July 28, 2022 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants