Update composer dependencies

This commit is contained in:
Chris
2019-06-11 12:29:32 +01:00
parent 7d6df3843b
commit 1f608b1c21
1835 changed files with 74500 additions and 27482 deletions

View File

@@ -12,6 +12,7 @@
namespace Symfony\Component\HttpKernel\Tests\Debug;
use PHPUnit\Framework\TestCase;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
@@ -31,7 +32,7 @@ class TraceableEventDispatcherTest extends TestCase
$kernel->terminate($request, $response);
$events = $stopwatch->getSectionEvents($response->headers->get('X-Debug-Token'));
$this->assertEquals(array(
$this->assertEquals([
'__section__',
'kernel.request',
'kernel.controller',
@@ -39,17 +40,17 @@ class TraceableEventDispatcherTest extends TestCase
'controller',
'kernel.response',
'kernel.terminate',
), array_keys($events));
], array_keys($events));
}
public function testStopwatchCheckControllerOnRequestEvent()
{
$stopwatch = $this->getMockBuilder('Symfony\Component\Stopwatch\Stopwatch')
->setMethods(array('isStarted'))
->setMethods(['isStarted'])
->getMock();
$stopwatch->expects($this->once())
->method('isStarted')
->will($this->returnValue(false));
->willReturn(false);
$dispatcher = new TraceableEventDispatcher(new EventDispatcher(), $stopwatch);
@@ -61,11 +62,11 @@ class TraceableEventDispatcherTest extends TestCase
public function testStopwatchStopControllerOnRequestEvent()
{
$stopwatch = $this->getMockBuilder('Symfony\Component\Stopwatch\Stopwatch')
->setMethods(array('isStarted', 'stop', 'stopSection'))
->setMethods(['isStarted', 'stop', 'stopSection'])
->getMock();
$stopwatch->expects($this->once())
->method('isStarted')
->will($this->returnValue(true));
->willReturn(true);
$stopwatch->expects($this->once())
->method('stop');
$stopwatch->expects($this->once())
@@ -89,10 +90,10 @@ class TraceableEventDispatcherTest extends TestCase
$called2 = true;
});
});
$dispatcher->dispatch('my-event');
$dispatcher->dispatch(new Event(), 'my-event');
$this->assertTrue($called1);
$this->assertFalse($called2);
$dispatcher->dispatch('my-event');
$dispatcher->dispatch(new Event(), 'my-event');
$this->assertTrue($called2);
}
@@ -104,7 +105,7 @@ class TraceableEventDispatcherTest extends TestCase
};
$eventDispatcher->addListener('foo', $listener1);
$eventDispatcher->addListener('foo', function () {});
$eventDispatcher->dispatch('foo');
$eventDispatcher->dispatch(new Event(), 'foo');
$this->assertCount(1, $eventDispatcher->getListeners('foo'), 'expected listener1 to be removed');
}
@@ -112,9 +113,9 @@ class TraceableEventDispatcherTest extends TestCase
protected function getHttpKernel($dispatcher, $controller)
{
$controllerResolver = $this->getMockBuilder('Symfony\Component\HttpKernel\Controller\ControllerResolverInterface')->getMock();
$controllerResolver->expects($this->once())->method('getController')->will($this->returnValue($controller));
$controllerResolver->expects($this->once())->method('getController')->willReturn($controller);
$argumentResolver = $this->getMockBuilder('Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface')->getMock();
$argumentResolver->expects($this->once())->method('getArguments')->will($this->returnValue(array()));
$argumentResolver->expects($this->once())->method('getArguments')->willReturn([]);
return new HttpKernel($dispatcher, $controllerResolver, new RequestStack(), $argumentResolver);
}