Skip to content

Commit 3127f97

Browse files
authored
Revert "assert streamed content (#45288)" (#45293)
This reverts commit 373fe08.
1 parent 373fe08 commit 3127f97

File tree

2 files changed

+0
-36
lines changed

2 files changed

+0
-36
lines changed

src/Illuminate/Testing/TestResponse.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -572,19 +572,6 @@ public function assertContent($value)
572572
return $this;
573573
}
574574

575-
/**
576-
* Assert that the given string matches the streamed response content.
577-
*
578-
* @param $value
579-
* @return $this
580-
*/
581-
public function assertStreamedContent($value)
582-
{
583-
PHPUnit::assertSame($value, $this->streamedContent());
584-
585-
return $this;
586-
}
587-
588575
/**
589576
* Assert that the given string or array of strings are contained within the response.
590577
*

tests/Testing/TestResponseTest.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -234,29 +234,6 @@ public function testAssertContent()
234234
}
235235
}
236236

237-
public function testAssertStreamedContent()
238-
{
239-
$response = TestResponse::fromBaseResponse(
240-
(new StreamedResponse)->setContent('expected response data')
241-
);
242-
243-
$this->assertStreamedContent('expected response data');
244-
245-
try {
246-
$response->assertStreamedContent('expected');
247-
$this->fail('xxxx');
248-
} catch (AssertionFailedError $e) {
249-
$this->assertSame('Failed asserting that two strings are identical.', $e->getMessage());
250-
}
251-
252-
try {
253-
$response->assertStreamedContent('expected response data with extra');
254-
$this->fail('xxxx');
255-
} catch (AssertionFailedError $e) {
256-
$this->assertSame('Failed asserting that two strings are identical.', $e->getMessage());
257-
}
258-
}
259-
260237
public function testAssertSee()
261238
{
262239
$response = $this->makeMockResponse([

0 commit comments

Comments
 (0)