public static function setUpBeforeClass() { // Try to use PHP_BINARY constant if available so lint tests are run // using the same php binary as phpunit. If not available (pre PHP // 5.4), assume binary is called 'php' and is in PATH. self::$php_binary = defined('PHP_BINARY') ? escapeshellcmd(PHP_BINARY) : 'php'; $output = array(); $status = 1; exec(sprintf('(%s --version) 2>&1', self::$php_binary), $output, $status); if ($status) { $output = implode("\n", $output); if (self::$php_binary === 'php') { self::markTestSkipped(sprintf('php is not in PATH or broken. Output: %s', $output)); } else { self::markTestSkipped(sprintf('Could not run PHP_BINARY %s. Output: %s', self::$php_binary, $output)); } } }