Upgrade 1-11.38

This commit is contained in:
xesmyd
2026-03-30 14:10:30 +02:00
parent f2a7e6d1fc
commit ac648ef29d
24665 changed files with 69682 additions and 2205004 deletions
@@ -19,7 +19,7 @@ class StreamedResponseTest extends TestCase
{
public function testConstructor()
{
$response = new StreamedResponse(function () { echo 'foo'; }, 404, array('Content-Type' => 'text/plain'));
$response = new StreamedResponse(function () { echo 'foo'; }, 404, ['Content-Type' => 'text/plain']);
$this->assertEquals(404, $response->getStatusCode());
$this->assertEquals('text/plain', $response->headers->get('Content-Type'));
@@ -51,7 +51,7 @@ class StreamedResponseTest extends TestCase
public function testPrepareWithHeadRequest()
{
$response = new StreamedResponse(function () { echo 'foo'; }, 200, array('Content-Length' => '123'));
$response = new StreamedResponse(function () { echo 'foo'; }, 200, ['Content-Length' => '123']);
$request = Request::create('/', 'HEAD');
$response->prepare($request);
@@ -61,7 +61,7 @@ class StreamedResponseTest extends TestCase
public function testPrepareWithCacheHeaders()
{
$response = new StreamedResponse(function () { echo 'foo'; }, 200, array('Cache-Control' => 'max-age=600, public'));
$response = new StreamedResponse(function () { echo 'foo'; }, 200, ['Cache-Control' => 'max-age=600, public']);
$request = Request::create('/', 'GET');
$response->prepare($request);
@@ -81,29 +81,16 @@ class StreamedResponseTest extends TestCase
$this->assertEquals(1, $called);
}
/**
* @expectedException \LogicException
*/
public function testSendContentWithNonCallable()
{
$this->expectException('LogicException');
$response = new StreamedResponse(null);
$response->sendContent();
}
/**
* @expectedException \LogicException
*/
public function testSetCallbackNonCallable()
{
$response = new StreamedResponse(null);
$response->setCallback(null);
}
/**
* @expectedException \LogicException
*/
public function testSetContent()
{
$this->expectException('LogicException');
$response = new StreamedResponse(function () { echo 'foo'; });
$response->setContent('foo');
}