Looks like you're testing the whole app. I don't think there is any way of disabling the exit sentences.
The workaround (and recommended way of testing whole apps), is accesing the site using curl, and checking that the HTML contains what you expect.
Even better if you use a scraping solution that will let you query the HTML using selectors or XPath, like this one.