There should be an extra test namespace which should not be visible to the outside. Having test classes show up in production classmaps is unnecessary waste of memory.

Composer itself doesn't do this either.
https://github.com/composer/composer/blob/master/composer.json#L40
https://github.com/composer/composer/blob/master/tests/bootstrap.php#L16