];
// Add long link title attributes to source data.
$title = Random::
getGenerator()->
string('500'
);
$tests[0
]['source_data'
]['menu_links'
][0
]['options'
]['attributes'
]['title'
] =
$title;
// Build the expected results.
$expected =
$tests[0
]['source_data'
]['menu_links'
];
// Add long link title attributes to expected results.
$expected[0
]['description'
] = Unicode::
truncate($title, 255
);
// Don't expect D6 menu link to a custom menu, provided by menu module.
unset($expected[5
]);
array_walk($tests[0
]['source_data'
]['menu_links'
],
function D&
$row) { $row['options'
] =
serialize($row['options'
]);
});
// Adjust the order to match the order used in the query. The expected[5] is
// not returned by the source query because it is an admin menu link.
$tests[0
]['expected_data'
] =
[];