Skip to content

Commit b433fd1

Browse files
committed
Remove documentation paraph
1 parent 2c5191f commit b433fd1

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

src/LiveComponent/doc/index.rst

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3834,44 +3834,6 @@ uses Symfony's test client to render and make requests to your components::
38343834
The ``InteractsWithLiveComponents`` trait can only be used in tests that extend
38353835
``Symfony\Bundle\FrameworkBundle\Test\KernelTestCase``.
38363836

3837-
When testing live components, you can assert whether a specific event has been emitted using new assertion methods provided by the ``InteractsWithLiveComponents`` trait.
3838-
3839-
Use the following assertions to verify event emissions from your live component::
3840-
3841-
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
3842-
use Symfony\UX\LiveComponent\Test\InteractsWithLiveComponents;
3843-
3844-
class MyComponentTest extends KernelTestCase
3845-
{
3846-
use InteractsWithLiveComponents;
3847-
3848-
public function testEventEmission(): void
3849-
{
3850-
$testComponent = $this->createLiveComponent(
3851-
name: 'MyComponent',
3852-
data: ['foo' => 'bar'],
3853-
);
3854-
3855-
// Call an action that emits an event
3856-
$render = $testComponent->call('triggerEvent')->render();
3857-
3858-
// Assert that the event was emitted
3859-
$this->componentHasEmittedEvent($render, 'event-name', [
3860-
'eventArg1' => 'value',
3861-
]);
3862-
3863-
// Assert that a specific event was *not* emitted
3864-
$this->assertComponentNotEmitEvent($render, 'unwanted-event');
3865-
}
3866-
}
3867-
3868-
.. note::
3869-
3870-
These assertions are only available when using the ``InteractsWithLiveComponents`` trait in a test class that extends
3871-
``Symfony\Bundle\FrameworkBundle\Test\KernelTestCase``.
3872-
3873-
---
3874-
38753837
Test LiveCollectionType
38763838
~~~~~~~~~~~~~~~~~~~~~~~
38773839

0 commit comments

Comments
 (0)