ui-test-tidb.php
13 lines
| 1 | <?php |
| 2 | |
| 3 | namespace { |
| 4 | use Piwik\DI; |
| 5 | return ['observers.global' => DI::add([['API.ScheduledReports.getReports.end', DI::value(function (&$result, $parameters) { |
| 6 | // TiDb uses a different collation, causing the report order to be slightly different. |
| 7 | // To have a consistent sorting, we manually sort here in PHP again. |
| 8 | \usort($result, function ($a, $b) { |
| 9 | return \strcmp($a['description'], $b['description']); |
| 10 | }); |
| 11 | })]])]; |
| 12 | } |
| 13 |