Current Parsoid API test script is https://phabricator.wikimedia.org/diffusion/GPAR/browse/master/tests/mocha/api.js .
It should be ported to phpunit. Alternately, a mechanism for running it against MediaWiki should be developed.
You can use the PARSOID_URL env variable to set the URL of the API (which is assumed to be identical to the JS one).