Fix and enhance load profiles rights in phpunit tests