mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-04 16:44:11 +01:00
Updating Symfony lib and dependencies:
Package operations: 2 installs, 23 updates, 0 removals - Updating psr/log (1.1.0 => 1.1.2) - Updating symfony/debug (v3.4.30 => v3.4.35) - Updating symfony/console (v3.4.30 => v3.4.35) - Updating symfony/dotenv (v3.4.30 => v3.4.35) - Updating symfony/routing (v3.4.30 => v3.4.35) - Updating symfony/finder (v3.4.30 => v3.4.35) - Updating symfony/filesystem (v3.4.30 => v3.4.35) - Installing symfony/polyfill-util (v1.12.0) - Installing symfony/polyfill-php56 (v1.12.0) - Updating symfony/http-foundation (v3.4.30 => v3.4.35) - Updating symfony/event-dispatcher (v3.4.30 => v3.4.35) - Updating symfony/http-kernel (v3.4.30 => v3.4.35) - Updating symfony/config (v3.4.30 => v3.4.35) - Updating symfony/dependency-injection (v3.4.30 => v3.4.35) - Updating symfony/class-loader (v3.4.30 => v3.4.35) - Updating symfony/cache (v3.4.30 => v3.4.35) - Updating symfony/framework-bundle (v3.4.30 => v3.4.35) - Updating twig/twig (v1.42.2 => v1.42.4) - Updating symfony/twig-bridge (v3.4.30 => v3.4.35) - Updating symfony/twig-bundle (v3.4.30 => v3.4.35) - Updating symfony/yaml (v3.4.30 => v3.4.35) - Updating symfony/stopwatch (v3.4.30 => v3.4.35) - Updating symfony/var-dumper (v3.4.30 => v3.4.35) - Updating symfony/web-profiler-bundle (v3.4.30 => v3.4.35) - Updating symfony/css-selector (v3.4.30 => v3.4.35)
This commit is contained in:
@@ -30,21 +30,17 @@ use Symfony\Component\HttpKernel\KernelEvents;
|
||||
|
||||
class HttpKernelTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
*/
|
||||
public function testHandleWhenControllerThrowsAnExceptionAndCatchIsTrue()
|
||||
{
|
||||
$this->expectException('RuntimeException');
|
||||
$kernel = $this->getHttpKernel(new EventDispatcher(), function () { throw new \RuntimeException(); });
|
||||
|
||||
$kernel->handle(new Request(), HttpKernelInterface::MASTER_REQUEST, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
*/
|
||||
public function testHandleWhenControllerThrowsAnExceptionAndCatchIsFalseAndNoListenerIsRegistered()
|
||||
{
|
||||
$this->expectException('RuntimeException');
|
||||
$kernel = $this->getHttpKernel(new EventDispatcher(), function () { throw new \RuntimeException(); });
|
||||
|
||||
$kernel->handle(new Request(), HttpKernelInterface::MASTER_REQUEST, false);
|
||||
@@ -177,11 +173,9 @@ class HttpKernelTest extends TestCase
|
||||
$this->assertEquals('hello', $kernel->handle(new Request())->getContent());
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
*/
|
||||
public function testHandleWhenNoControllerIsFound()
|
||||
{
|
||||
$this->expectException('Symfony\Component\HttpKernel\Exception\NotFoundHttpException');
|
||||
$dispatcher = new EventDispatcher();
|
||||
$kernel = $this->getHttpKernel($dispatcher, false);
|
||||
|
||||
@@ -229,11 +223,9 @@ class HttpKernelTest extends TestCase
|
||||
$this->assertResponseEquals(new Response('foo'), $kernel->handle(new Request()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \LogicException
|
||||
*/
|
||||
public function testHandleWhenTheControllerDoesNotReturnAResponse()
|
||||
{
|
||||
$this->expectException('LogicException');
|
||||
$dispatcher = new EventDispatcher();
|
||||
$kernel = $this->getHttpKernel($dispatcher, function () { return 'foo'; });
|
||||
|
||||
@@ -331,11 +323,9 @@ class HttpKernelTest extends TestCase
|
||||
$kernel->handle($request, HttpKernelInterface::MASTER_REQUEST);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Symfony\Component\HttpKernel\Exception\BadRequestHttpException
|
||||
*/
|
||||
public function testInconsistentClientIpsOnMasterRequests()
|
||||
{
|
||||
$this->expectException('Symfony\Component\HttpKernel\Exception\BadRequestHttpException');
|
||||
$request = new Request();
|
||||
$request->setTrustedProxies(['1.1.1.1'], Request::HEADER_X_FORWARDED_FOR | Request::HEADER_FORWARDED);
|
||||
$request->server->set('REMOTE_ADDR', '1.1.1.1');
|
||||
|
||||
Reference in New Issue
Block a user