Build/Test Tools: Add support for PHPUnit 6+.
This adds a compatibility shim for the new namespaced structure of PHPUnit and the removed setExpectedException() method. In addition, this updates the Travis config so PHPUnit 6.1 is used where appropriate.
setExpectedException()
Props miyauchi, gitlost.
Fixes #39822