Patch literally extracted from that issue; has been peer-reviewed plenty of times already.
- drupalCreateUser() throws an error when Comment module is not installed.
- Remove dependency on Comment and Node modules from testing API.
- drupalCreateUser() attempts to create a new user with a set of default permissions pertaining to Node and Comment modules.
- When Comment or Node module is not installed, drupalCreateUser() fails to create a user role with the default permissions, because the permissions do not exist.
- Those default permissions are superfluous anyway, because they are assigned by default to the authenticated user role, which applies to all authenticated users. Thus, it is pointless to create a new user role for the default permissions.
None. As detailed above, the removed permissions are the default permissions either way.
This patch is contained in several other patches already, which will have to be re-rolled after this lands: