vip-scanner
vip-scanner copied to clipboard
When java is missing, phpunit tests fail with other error
If you run the phpunit tests without java installed on your system, you get
1) JavaScriptLintTest::testJavaScriptSyntaxError
Failed asserting that true is false.
/srv/www/wp-content/plugins/vip-scanner/tests/checks/test-JavaScriptLintCheck.php:27
2) JavaScriptLintTest::testJavaScriptCorrectSyntax
Failed asserting that an array does not contain 'yuicompressor'.
/srv/www/wp-content/plugins/vip-scanner/tests/checks/test-JavaScriptLintCheck.php:52
Instead, I would have expected to see the output from JavaScriptLintCheck.php:23
$this->add_error( 'yuicompressor', 'YUI Compressor', BaseScanner::LEVEL_WARNING, null, array( 'Java is not present on this system - as such, the YUI Compressor wasn\'t performed on this theme.') );
Are you running vip-scanner on Windows? is_java_installed() uses the which command, which is probably not available on Windows...
I'm on windows, but running in a VIP-Quickstart VM env, so the 'which' command is available.