Extends
lithium\test\Unit
Tests `Collection::sort`.
Source
public function testSort() {
$collection = new DocumentSet();
$collection->set(array(
array('id' => 1, 'name' => 'Annie'),
array('id' => 2, 'name' => 'Zilean'),
array('id' => 3, 'name' => 'Trynamere'),
array('id' => 4, 'name' => 'Katarina'),
array('id' => 5, 'name' => 'Nunu')
));
$collection->sort('name');
$idsSorted = $collection->map(function ($v) { return $v['id']; })->to('array');
$this->assertEqual($idsSorted, array(1,4,5,3,2));
}