Skip to content

Commit

Permalink
Add new assertMethodWiredToForm to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Rumpel committed May 13, 2021
1 parent bed2b09 commit 21cc5c5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ Livewire::test(FeedbackForm::class)
->assertMethodWired('submit');
```

### Check if a Livewire method is wired to an HTML form

```php
Livewire::test(FeedbackForm::class)
->assertMethodWiredToForm('upload');
```

It looks for a string like `wire:submit.prevent="upload"` in your components's view file.

### Check if a Livewire component contains another Livewire component
```php
Livewire::test(FeedbackForm::class)
Expand Down

0 comments on commit 21cc5c5

Please sign in to comment.