Realizing how silly my question was, I took the advice of @Chris Haas.
I modified my main php script to just do the authentication, and save the tokens. I then used the phpunit CLI to run my test code, which read the saved tokens on start up.
Thanks Chris. Solved my problem and gave me more robust code. Win-win.