Once an API is shipped it doesn't matter if it behaves as originally intended - how it actually behaves is the important part. Consumers depend on it's existing behaviour and we need a way to capture that and ensure that it doesn't change. This is where Behat comes in. Behat is a BDD tool that was built to help design software, but it’s actually a fantastic tool for testing APIs after they have been developed too.
We’ve successfully used this technique to give us the confidence to refactor 5+ year old applications by capturing the existing behaviour before making any changes. Now, I want to share the secrets we learned with you. You don't need existing Behat or testing experience, just a desire to prevent breaking changes in your API.