Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
BigPipe example
class
ManyPlaceholderTest
extends
UnitTestCase
{
/** * @covers \Drupal\big_pipe\Render\BigPipe::sendNoJsPlaceholders */
public
function
testManyNoJsPlaceHolders
(
)
{
$session
=
$this
->
prophesize
(
SessionInterface::
class
)
;
$session
->
start
(
)
->
willReturn
(
TRUE
)
;
$session
->
save
(
)
->
shouldBeCalled
(
)
;
$bigpipe
=
new
BigPipe
(
$this
->
prophesize
(
RendererInterface::
class
)
->
reveal
(
)
,
$session
->
reveal
(
)
,
$this
->
prophesize
(
RequestStack::
class
)
->
reveal
(
)
,
$this
->
prophesize
(
HttpKernelInterface::
class
)
->
reveal
(
)
,
$this
->
prophesize
(
EventDispatcherInterface::
class
)
->
reveal
(
)
,
$this
->
prophesize
(
ConfigFactoryInterface::
class
)
->
reveal
(
)
)
;
$response
=
new
BigPipeResponse
(
new
HtmlResponse
(
)
)
;
// Add many placeholders.
$many_placeholders
=
[
]
;