Reworked the phantomjs test.