// Setup a view list builder with a mocked buildOperations method,
// because t() is called on there.
$entity_type =
$this->
createMock('Drupal\Core\Entity\EntityTypeInterface'
);
$view_list_builder =
new TestViewListBuilder($entity_type,
$storage,
$display_manager);
$view_list_builder->
setStringTranslation($this->
getStringTranslationStub());
// Create new view with test values.
$view =
new View($values, 'view'
);
// Get the row object created by ViewListBuilder for this test view.
$row =
$view_list_builder->
buildRow($view);
// Expected output array for view's displays.
$expected_displays =
[ '0' =>
[ 'display' => 'Embed admin label',
'path' => FALSE,
],
'1' =>
[ 'display' => 'Page admin label',
'path' => '/<object>malformed_path</object>',
],