docs: replace deprecated assertFormExists with assertSchemaExists (#19365)

* docs: replace deprecated assertFormExists with assertSchemaExists

* Update assertSchemaExists usage in documentation

Signed-off-by: Dan Harrin <git@danharrin.com>

---------

Signed-off-by: Dan Harrin <git@danharrin.com>
Co-authored-by: Dan Harrin <git@danharrin.com>
This commit is contained in:
Ehsan Mahmoodi
2026-02-27 14:34:23 +03:30
committed by GitHub
parent 2a8807fd3a
commit ba2d2e96d8
+3 -3
View File
@@ -103,18 +103,18 @@ livewire(CreatePost::class)
## Testing the existence of a form
To check that a Livewire component has a form, use `assertFormExists()`:
To check that a Livewire component has a form, use `assertSchemaExists('form')`:
```php
use function Pest\Livewire\livewire;
it('has a form', function () {
livewire(CreatePost::class)
->assertFormExists();
->assertSchemaExists('form');
});
```
> If you have multiple schemas on a Livewire component, you can pass the name of a specific form like `assertFormExists('createPostForm')`.
> If you have multiple schemas on a Livewire component, you can pass the name of a specific form like `assertSchemaExists('createPostForm')`.
## Testing the existence of form fields