// Test buildHeader() method.
$expected_items =
[ 'label' => 'Label',
'id' => 'Machine name',
'operations' => 'Operations',
];
$actual_items =
$controller->
buildHeader();
$this->
assertEquals($expected_items,
$actual_items, 'Return value from buildHeader matches expected.'
);
// Test buildRow() method.
$build_operations =
$controller->
buildOperations($entity);
$expected_items =
[ 'label' => 'Default',
'id' => 'dotted.default',
'operations' =>
[ 'data' =>
$build_operations,
],
];
$actual_items =
$controller->
buildRow($entity);
$this->
assertEquals($expected_items,
$actual_items, 'Return value from buildRow matches expected.'
);
// Test sorting.
$storage =
$controller->
getStorage();