Mention Event::fake()

This commit is contained in:
Samuel Štancl 2020-09-15 11:51:07 +02:00 committed by GitHub
parent ee024c7e5b
commit 6832de38bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,8 +6,26 @@ section: content
# Testing {#testing} # Testing {#testing}
> If you're a sponsor, you can get an opinionated, but automatic testing setup on the site with exclusive content for sponsors: https://sponsors.tenancyforlaravel.com/frictionless-testing-setup
TODO: Review TODO: Review
## Events
Keep in mind that the package makes heavy use of events, so if you use `Event::fake()` anywhere in your tests, tenancy initialization and related processes might break.
For that reason, try to be selective about faking tests. Use for example:
```php
Event::fake([MyEvent::class]);
```
rather than
```php
Event::fake();
```
## Central app {#central-app} ## Central app {#central-app}
To test your central app, just write normal Laravel tests. To test your central app, just write normal Laravel tests.