How to test web API in PHP?

Do we have any methods to test our Web API like Phpunit?
In a interview, asked me someone how do you test your API? and I answered I test my Web APIs manually by Postman.
But I forgot to ask him what is the right way?