Skip to content

Commit c0b3256

Browse files
committed
Minor tweaks
1 parent 68f4ce4 commit c0b3256

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

mercure.rst

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -371,13 +371,13 @@ If the client is not a web browser, then using an authorization header is the wa
371371
The native implementation of EventSource doesn't allow specifying headers.
372372
For example, authorization using Bearer token. In order to achieve that, use `a polyfill`_
373373

374-
.. code-block:: javascript
374+
.. code-block:: javascript
375375
376-
const es = new EventSourcePolyfill(url, {
377-
headers: {
378-
'Authorization': 'Bearer ' + token,
379-
}
380-
});
376+
const es = new EventSourcePolyfill(url, {
377+
headers: {
378+
'Authorization': 'Bearer ' + token,
379+
}
380+
});
381381
382382
In the following example controller,
383383
the generated cookie contains a JWT, itself containing the appropriate targets.
@@ -545,7 +545,8 @@ its Mercure support.
545545
Testing
546546
--------
547547

548-
During functional testing there is no need to send updates to Mercure. They will be handled by a stub publisher::
548+
During functional testing there is no need to send updates to Mercure. They will
549+
be handled by a stub publisher::
549550

550551
// tests/Functional/Fixtures/PublisherStub.php
551552
namespace App\Tests\Functional\Fixtures;
@@ -560,13 +561,13 @@ During functional testing there is no need to send updates to Mercure. They will
560561
}
561562
}
562563

563-
PublisherStub decorates the default publisher service so no updates are actually sent. Here is the PublisherStub implementation::
564+
PublisherStub decorates the default publisher service so no updates are actually
565+
sent. Here is the PublisherStub implementation::
564566

565-
#services_test.yaml
567+
# config/services_test.yaml
566568
App\Tests\Functional\Fixtures\PublisherStub:
567569
decorates: mercure.hub.default.publisher
568570

569-
570571
.. _`the Mercure protocol`: https://github.com/dunglas/mercure#protocol-specification
571572
.. _`Server-Sent Events (SSE)`: https://developer.mozilla.org/docs/Server-sent_events
572573
.. _`a polyfill`: https://github.com/Yaffle/EventSource

0 commit comments

Comments
 (0)