Trying to run phpunit and getting this error. Doing some research pointed towards some sort of DOM module not being loaded? I don't know much about it though.
I just found a solution. I ran sudo apt-get install php-xml.
Why is this required though? I've run phpunit in the bast (before VVV was on php7).
Hi @joelworsham, thanks for the report. Were you running phpunit with the WordPress core unit tests or for another project? I haven't needed to install php-xml for the core tests yet, but it's always possible something changed in php7.
It was with core tests. I used WP CLI to scaffold the project. I followed the instructions from Pippin's tutorial here: https://pippinsplugins.com/unit-tests-wordpress-plugins-setting-up-testing-suite/
I have run into the same issue while testing one plugin that used DOMDocument class, I would recommend to bundle php-xml which includes the dom module as well
this wasn't an issue with PHP5 the stable release was shipping with
for now I have fixed by ssh'ing into the box and installing the module like @joelworsham did
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
I have run into the same issue while testing one plugin that used
DOMDocumentclass, I would recommend to bundlephp-xmlwhich includes thedommodule as wellthis wasn't an issue with PHP5 the stable release was shipping with
for now I have fixed by ssh'ing into the box and installing the module like @joelworsham did