In T224979: Parsoid REST Routes Extension, we have turned the Parsoid library repo into a makeshift extension, to use for testing core integration until the codebase stabilizes and can be moved into core (or maybe a proper extension). We'll need to set up extension tests for that.
We should update our developer docs as well to reflect best practices to installing Parsoid & running PHP tests. Should Parsoid be installed inside core/extensions/Parsoid and/or is setting $MW_INSTALL_PATH sufficient? Ideally composer extension-test or something would Do The Right Thing assuming proper set up (whether that's installing Parsoid inside the extension folder or setting MW_INSTALL_PATH or whatever else the Right Thing needs to be).