Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
ViewsDataHelper example
/** * Tests fetchFields. */
public
function
testFetchFields
(
)
{
$views_data
=
$this
->
getMockBuilder
(
'Drupal\views\ViewsData'
)
->
disableOriginalConstructor
(
)
->
getMock
(
)
;
$views_data
->
expects
(
$this
->
once
(
)
)
->
method
(
'getAll'
)
->
willReturn
(
$this
->
viewsData
(
)
)
;
$data_helper
=
new
ViewsDataHelper
(
$views_data
)
;
$expected
=
[
'field' =>
[
'age',
'created',
'job',
'name',
'status',
]
,
'argument' =>
[
'age',