BUG Allow PHPUnit installation with composer / Fix travis

See #3087 for 3.0 version
See #3049 for original work on this. Credit to @willmorgan for all the hard work. :)