Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
hash_submit example
$redirect
=
$form_submitter
->
redirectForm
(
$form_state
)
;
$this
->
assertNull
(
$redirect
)
;
}
/** * @covers ::executeSubmitHandlers */
public
function
testExecuteSubmitHandlers
(
)
{
$form_submitter
=
$this
->
getFormSubmitter
(
)
;
$mock
=
$this
->
prophesize
(
MockFormBase::
class
)
;
$mock
->
hash_submit
(
Argument::
type
(
'array'
)
, Argument::
type
(
FormStateInterface::
class
)
)
->
shouldBeCalledOnce
(
)
;
$mock
->
submit_handler
(
Argument::
type
(
'array'
)
, Argument::
type
(
FormStateInterface::
class
)
)
->
shouldBeCalledOnce
(
)
;
$mock
->
simple_string_submit
(
Argument::
type
(
'array'
)
, Argument::
type
(
FormStateInterface::
class
)
)
->
shouldBeCalledOnce
(
)
;
$form
=
[
]
;
$form_state
=
new
FormState
(
)
;
$form_submitter
->
executeSubmitHandlers
(
$form
,
$form_state
)
;