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

[11.x] Allow TestComponent to be macroable #54359

Merged
merged 2 commits into from
Jan 26, 2025

Conversation

ziadoz
Copy link
Contributor

@ziadoz ziadoz commented Jan 26, 2025

This PR allows the TestComponent class to be macroable like TestView.

In my case, I'd like to be able to chain on my own custom HTML assertion methods:

TestComponent::macro('assertElement', fn (): => //...);
public function test_my_component(): void
{
    $this->component(MyComponent::class, [...])->assertElement(...);
}

@taylorotwell taylorotwell merged commit 4673387 into laravel:11.x Jan 26, 2025
40 checks passed
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.

2 participants