I am still learning php I would like to discover how can I create a function compare and list using usort() for this array and debug render for phpunit?
// create an array with names to be sorted
$names = array('a', 'b', 'c');
// render the sorted names
$example = new \Example($names);
$example->renderNamesSorted();
function sortedNames (){
}
function renderNamesSorted (){
}
My actual output on php unit is
Failed asserting that two arrays are equal.
Array (
0 => 'a'
- 1 => 'b'
- 2 => 'c'
+ 1 => 'c'
+ 2 => 'b'
)
I would like create a function to compare and avoid not equal value in output phpunit
Any ideas? thanks