replace "if (some variable is empty) then throw an exception" with assertInstanceOf PHPunit checks
remove try/catch blocks that are not needed. If an unexpected exception is thrown in a test, then PHPunit will fail the test anyway and report the problem
make sure that we confirm that loops really are executed at least once (for example, if we have an array of roles and are looping through the array looking for a particular role, and then asserting something about that role, then the test should be made to fail if that role is not found at all
See the linked PR for examples of the changes needed.
Similar to PR #236
See the linked PR for examples of the changes needed.