Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
TestHandler example
parent::
setUp
(
)
;
$this
->
setupViewsData
(
)
;
$this
->
setupExecutableAndView
(
)
;
$this
->
setupDisplay
(
)
;
}
/** * @covers ::getEntityType */
public
function
testGetEntityTypeForFieldOnBaseTable
(
)
{
$handler
=
new
TestHandler
(
[
]
, 'test_handler',
[
]
)
;
$handler
->
init
(
$this
->executable,
$this
->display
)
;
$this
->view->
expects
(
$this
->
any
(
)
)
->
method
(
'get'
)
->
with
(
'base_table'
)
->
willReturn
(
'test_entity_type_table'
)
;
$this
->viewsData->
expects
(
$this
->
any
(
)
)
->
method
(
'get'
)
->
with
(
'test_entity_type_table'
)
->
willReturn
(
[
'table' =>
[
'entity type' => 'test_entity_type'
]
,
]
)
;