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
+8 -12
View File
@@ -120,11 +120,9 @@ class SsiTest extends TestCase
$this->assertEquals('<?php echo "<?"; ?>php <?php echo "<?"; ?> <?php echo "<%"; ?> <?php echo "<s"; ?>cript language=php>', $response->getContent());
}
/**
* @expectedException \RuntimeException
*/
public function testProcessWhenNoSrcInAnSsi()
{
$this->expectException('RuntimeException');
$ssi = new Ssi();
$request = Request::create('/');
@@ -160,11 +158,9 @@ class SsiTest extends TestCase
$this->assertEquals('foo', $ssi->handle($cache, '/', '/alt', true));
}
/**
* @expectedException \RuntimeException
*/
public function testHandleWhenResponseIsNot200()
{
$this->expectException('RuntimeException');
$ssi = new Ssi();
$response = new Response('foo');
$response->setStatusCode(404);
@@ -187,26 +183,26 @@ class SsiTest extends TestCase
$response1 = new Response('foo');
$response1->setStatusCode(404);
$response2 = new Response('bar');
$cache = $this->getCache(Request::create('/'), array($response1, $response2));
$cache = $this->getCache(Request::create('/'), [$response1, $response2]);
$this->assertEquals('bar', $ssi->handle($cache, '/', '/alt', false));
}
protected function getCache($request, $response)
{
$cache = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpCache\HttpCache')->setMethods(array('getRequest', 'handle'))->disableOriginalConstructor()->getMock();
$cache = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpCache\HttpCache')->setMethods(['getRequest', 'handle'])->disableOriginalConstructor()->getMock();
$cache->expects($this->any())
->method('getRequest')
->will($this->returnValue($request))
->willReturn($request)
;
if (is_array($response)) {
if (\is_array($response)) {
$cache->expects($this->any())
->method('handle')
->will(call_user_func_array(array($this, 'onConsecutiveCalls'), $response))
->will(\call_user_func_array([$this, 'onConsecutiveCalls'], $response))
;
} else {
$cache->expects($this->any())
->method('handle')
->will($this->returnValue($response))
->willReturn($response)
;
}