To test your package with base-4.7 you'd simply run
stack test --resolver ghc-7.8 --install-ghc
Oh, actually that wouldn't be enough if you have more dependencies
than just base.
Try
stack init --resolver ghc-7.8 --solver --install-ghc
stack test
instead!