Skip to content

Commit c727c34

Browse files
committed
Complete documentation
1 parent 923fd73 commit c727c34

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/LiveComponent/doc/index.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3781,6 +3781,11 @@ uses Symfony's test client to render and make requests to your components::
37813781
->emit('increaseEvent', ['amount' => 2]) // emit a live event with arguments
37823782
;
37833783

3784+
// Assert that the event was emitted
3785+
$this->componentHasEmittedEvent($render, 'increaseEvent', [
3786+
'amount' => 2,
3787+
]);
3788+
37843789
// set live props
37853790
$testComponent
37863791
->set('count', 99)
@@ -3850,7 +3855,7 @@ Use the following assertions to verify event emissions from your live component:
38503855
// Call an action that emits an event
38513856
$render = $testComponent->call('triggerEvent')->render();
38523857

3853-
// Assert that the event was emitted with arguments
3858+
// Assert that the event was emitted
38543859
$this->componentHasEmittedEvent($render, 'event-name', [
38553860
'eventArg1' => 'value',
38563861
]);

0 commit comments

Comments
 (0)