Fixed tests to work with phantom