We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The documentation on architecture testing doesn't provide a lot of information on what is supported when using "toBeUsedIn".
I'm trying to test that no model observers are registered within a certain namespace. Some of the things I've tried that don't work:
arch('observers') ->expect('observe') ->not->toBeUsedIn('The\Namespace'); arch('observers') ->expect([Model::class, 'observe']) ->not->toBeUsedIn('The\Namespace'); arch('observers') ->expect(Model::class . '@observe') ->not->toBeUsedIn('The\Namespace');
None of these work. Is this kind of test possible? If so, what syntax should I be using? Thank you!
The text was updated successfully, but these errors were encountered:
According to the docs, this should work: https://pestphp.com/docs/arch-testing#content-tobeusedin
If it's not working, then this is a bug.
Question, though. Where did it tell you to use arch('observers') and ->expect('observe')?
arch('observers')
->expect('observe')
Sorry, something went wrong.
No branches or pull requests
The documentation on architecture testing doesn't provide a lot of information on what is supported when using "toBeUsedIn".
I'm trying to test that no model observers are registered within a certain namespace. Some of the things I've tried that don't work:
None of these work. Is this kind of test possible? If so, what syntax should I be using? Thank you!
The text was updated successfully, but these errors were encountered: