You can add your own messages to all PHPUnit assertions, something like this should work for you:-
$this->assertTrue(is_string($username), "Got a " . gettype($username) . " instead of a string");
Otherwise, you could use
$this->assertInternalType('string', $username, "Got a " . gettype($username) . " instead of a string");
This answer is now outdated. See this answer for the up to date solution.