File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -814,6 +814,7 @@ use Mercure\TestSuite\MockPublisher;
814814// In your test
815815public function testPublishing(): void
816816{
817+ // Se the mock publisher
817818 Publisher::setInstance(new MockPublisher());
818819
819820 // Test your code that publishes updates
Original file line number Diff line number Diff line change @@ -19,16 +19,14 @@ class MockPublisher implements PublisherInterface
1919 */
2020 private array $ updates = [];
2121
22- private string $ hubUrl ;
23-
2422 /**
2523 * Constructor
2624 *
2725 * @param string $hubUrl Hub URL to return
2826 */
29- public function __construct (string $ hubUrl = ' http://localhost:3000/.well-known/mercure ' )
30- {
31- $ this -> hubUrl = $ hubUrl ;
27+ public function __construct (
28+ protected readonly string $ hubUrl = ' http://localhost:3000/.well-known/mercure ' ,
29+ ) {
3230 }
3331
3432 /**
You can’t perform that action at this time.
0 commit comments