Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-78156 groups: Make groups_get_user_groups() order deterministic
Right now the order of the groups returned by groups_get_user_groups() is not fixed and, every DB, can return them in any order. While 99% of times the order will be the creation one, depending of the RDBMS decisions, they can be returned in any order. This is specially noticeable with Oracle, but can affect to any DB. And that makes some tests (expecting a given order) to fail. This commit fixes the problem by making the order of the groups deterministic, because that's the way we use to fix these problems. Alternative is to relax the tests so only values are asserted by using assertEqualsCanonicalizing().
- Loading branch information