Skip to content

Commit a48112a

Browse files
ISSUE #1425: Use Symfony's built in EventStreamResponse
1 parent fde728c commit a48112a

File tree

2 files changed

+38
-30
lines changed

2 files changed

+38
-30
lines changed

composer.lock

Lines changed: 27 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/Infrastructure/Http/ServerSentEventTest.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,22 @@ class ServerSentEventTest extends TestCase
99
{
1010
public function testToString(): void
1111
{
12+
$output = null;
13+
foreach (new ServerSentEvent(
14+
data: 'WAW ERROR',
15+
type: 'error'
16+
) as $yield) {
17+
$output .= $yield;
18+
}
19+
1220
$this->assertEquals(
1321
'event: error
1422
data: WAW ERROR
1523
24+
25+
1626
',
17-
(string) new ServerSentEvent(
18-
eventName: 'error',
19-
data: 'WAW ERROR'
20-
)
27+
$output
2128
);
2229
}
2330
}

0 commit comments

Comments
 (0)