When creating a symbolic link, how do I troubleshoot 'too many levels of symbolic links'?

Beware that using ln -s target /path/symlink, the target will be interpreted as relative to the path directory (where the symlink will belong). Your command would create a symlink that points to itself. Hence, a path lookup loop would occur every time the symlink is accessed.

In your case, maybe /usr/bin/phpunit already exists and is self-looping. Remove it first and change your command to:

me@laptop:~/PHPUnit$ ln -s ~/PHPUnit/phpunit /usr/bin/phpunit

(Using an absolute target is probably the best here)