Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
bodyContentType example
public
function
testBody
(
)
{
$action
=
(
new
HttpPostAction
(
)
)
->
body
(
$value
= 'content'
)
;
$this
->
assertSame
(
$value
,
$action
->
toArray
(
)
[
'body'
]
)
;
}
public
function
testBodyContentType
(
)
{
$action
=
(
new
HttpPostAction
(
)
)
->
bodyContentType
(
$value
= 'application/json'
)
;
$this
->
assertSame
(
$value
,
$action
->
toArray
(
)
[
'bodyContentType'
]
)
;
}
public
function
testToArray
(
)
{
$this
->
assertSame
(
[
'@type' => 'HttpPOST',
]
,
(
new
HttpPostAction
(
)
)
->
toArray
(
)
)
;