Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
SymfonyResponse example
$this
->redis
->
expects
(
static
::
exactly
(
2
)
)
->
method
(
'lPush'
)
->
willReturnCallback
(
function
D
$key
)
use
(
&
$parameters
)
: int
{
$parameters
[
]
=
$key
;
return
1;
}
)
;
$this
->gateway->
tag
(
[
'product-1', 'product-2'
]
, '/foo',
new
SymfonyResponse
(
)
)
;
static
::
assertSame
(
[
'product-1', 'product-2'
]
,
$parameters
)
;
}
public
function
testInvalidate
(
)
: void
{
$this
->redis->
expects
(
static
::
once
(
)
)
->
method
(
'eval'
)
->
willReturn
(
[
'/foo'
]
)
;
$this
->redis->
expects
(
static
::
once
(
)
)
->
method
(
'del'
)
->
with
(
'product-1'
)
;
$this
->mockHandler->
append
(
new
Response
(
200,
[
]
, null
)
)
;