[PhantomJS] Migrating functional tests to phantomjs