minor #39987 [HttpKernel] Fix transient tests (jderusse)
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpKernel] Fix transient tests
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | fix #
| License | MIT
| Doc PR | -
Because request contains a `REQUEST_TIME` attribute, it make tests failing https://ci.appveyor.com/project/fabpot/symfony/builds/37455398
Commits
-------
9562d6ba5a
Fix transient tests
This commit is contained in:
commit
c925f4cff8
@ -23,6 +23,9 @@ use Symfony\Component\HttpKernel\HttpKernel;
|
|||||||
use Symfony\Component\HttpKernel\KernelEvents;
|
use Symfony\Component\HttpKernel\KernelEvents;
|
||||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group time-sensitive
|
||||||
|
*/
|
||||||
class InlineFragmentRendererTest extends TestCase
|
class InlineFragmentRendererTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testRender()
|
public function testRender()
|
||||||
@ -253,8 +256,7 @@ class InlineFragmentRendererTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a Kernel expecting a request equals to $request
|
* Creates a Kernel expecting a request equals to $request.
|
||||||
* Allows delta in comparison in case REQUEST_TIME changed by 1 second.
|
|
||||||
*/
|
*/
|
||||||
private function getKernelExpectingRequest(Request $request, $strict = false)
|
private function getKernelExpectingRequest(Request $request, $strict = false)
|
||||||
{
|
{
|
||||||
@ -262,7 +264,7 @@ class InlineFragmentRendererTest extends TestCase
|
|||||||
$kernel
|
$kernel
|
||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
->method('handle')
|
->method('handle')
|
||||||
->with($this->equalTo($request, 1))
|
->with($request)
|
||||||
->willReturn(new Response('foo'));
|
->willReturn(new Response('foo'));
|
||||||
|
|
||||||
return $kernel;
|
return $kernel;
|
||||||
|
Reference in New Issue
Block a user