Merge branch '4.3' into 4.4

* 4.3:
  Add link to messenger documentation in its README
  [HttpKernel] restore compat with clock mocking
This commit is contained in:
Nicolas Grekas 2020-01-21 11:11:47 +01:00
commit c6a5d3d564
2 changed files with 5 additions and 3 deletions

View File

@ -24,8 +24,9 @@ class DisallowRobotsIndexingListenerTest extends TestCase
/** /**
* @dataProvider provideResponses * @dataProvider provideResponses
*/ */
public function testInvoke(?string $expected, Response $response): void public function testInvoke(?string $expected, array $responseArgs)
{ {
$response = new Response(...$responseArgs);
$listener = new DisallowRobotsIndexingListener(); $listener = new DisallowRobotsIndexingListener();
$event = new ResponseEvent($this->createMock(HttpKernelInterface::class), $this->createMock(Request::class), KernelInterface::MASTER_REQUEST, $response); $event = new ResponseEvent($this->createMock(HttpKernelInterface::class), $this->createMock(Request::class), KernelInterface::MASTER_REQUEST, $response);
@ -37,11 +38,11 @@ class DisallowRobotsIndexingListenerTest extends TestCase
public function provideResponses(): iterable public function provideResponses(): iterable
{ {
yield 'No header' => ['noindex', new Response()]; yield 'No header' => ['noindex', []];
yield 'Header already set' => [ yield 'Header already set' => [
'something else', 'something else',
new Response('', 204, ['X-Robots-Tag' => 'something else']), ['', 204, ['X-Robots-Tag' => 'something else']],
]; ];
} }
} }

View File

@ -7,6 +7,7 @@ message queues.
Resources Resources
--------- ---------
* [Documentation](https://symfony.com/doc/current/components/messenger.html)
* [Contributing](https://symfony.com/doc/current/contributing/index.html) * [Contributing](https://symfony.com/doc/current/contributing/index.html)
* [Report issues](https://github.com/symfony/symfony/issues) and * [Report issues](https://github.com/symfony/symfony/issues) and
[send Pull Requests](https://github.com/symfony/symfony/pulls) [send Pull Requests](https://github.com/symfony/symfony/pulls)