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

document how to use when testing within a bundle #152

Closed
tacman opened this issue Jul 1, 2024 · 2 comments
Closed

document how to use when testing within a bundle #152

tacman opened this issue Jul 1, 2024 · 2 comments

Comments

@tacman
Copy link

tacman commented Jul 1, 2024

I have a bundle that exposes a few controllers that I'm not sure how to test (from within the bundle).

symfony/symfony#57600 (comment)

Might that be possible with this library? In particular, I'm not sure how to configure the routes, so that I can go to

$this->browser()
        ->visit('/my-bundle/admin')
        ->assertSuccessful()

Thanks.

@kbond
Copy link
Member

kbond commented Jul 24, 2024

We do this in live components. You basically have to setup a test kernel for your bundle.

@tacman
Copy link
Author

tacman commented Jul 24, 2024

Thanks, I'll use LiveComponents as a model and work from there.

@tacman tacman closed this as completed Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants