Skip to content

Commit e981abf

Browse files
Marco van AngerenMarco van Angeren
authored andcommitted
reverted irrelevant test changes
1 parent 5b775ed commit e981abf

File tree

1 file changed

+6
-33
lines changed

1 file changed

+6
-33
lines changed

src/platform/tests/Result/StreamResultTest.php

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19,44 +19,17 @@ final class StreamResultTest extends TestCase
1919
public function testGetContent()
2020
{
2121
$generator = (function () {
22-
yield 'Hello';
23-
yield ' ';
24-
yield 'World';
22+
yield 'data1';
23+
yield 'data2';
2524
})();
2625

2726
$result = new StreamResult($generator);
28-
$content = iterator_to_array($result->getContent());
29-
30-
$this->assertSame(['Hello', ' ', 'World'], $content);
31-
}
27+
$this->assertInstanceOf(\Generator::class, $result->getContent());
3228

33-
public function testGetContentWithMultipleChunks()
34-
{
35-
$generator = (function () {
36-
yield 'Chunk';
37-
yield '1';
38-
yield 'Chunk';
39-
yield '2';
40-
})();
41-
42-
$result = new StreamResult($generator);
43-
$content = iterator_to_array($result->getContent());
44-
45-
$this->assertSame(['Chunk', '1', 'Chunk', '2'], $content);
46-
}
47-
48-
public function testGetContentWithEmptyGenerator()
49-
{
50-
$generator = (function () {
51-
// Empty generator
52-
if (false) {
53-
yield;
54-
}
55-
})();
56-
57-
$result = new StreamResult($generator);
5829
$content = iterator_to_array($result->getContent());
5930

60-
$this->assertSame([], $content);
31+
$this->assertCount(2, $content);
32+
$this->assertSame('data1', $content[0]);
33+
$this->assertSame('data2', $content[1]);
6134
}
6235
}

0 commit comments

Comments
 (0)