Add AliasesProviderTrait and refactor tests

Signed-off-by: crynobone <crynobone@gmail.com>