private function findPhpunit() { $has_phpdbg = $this->fs->phpdbgExists(); if ($this->fs->fileExists('vendor/bin/phpunit')) { if ($has_phpdbg) { return "phpdbg -qrr " . implode(DIRECTORY_SEPARATOR, ['vendor', 'phpunit', 'phpunit', 'phpunit']); } else { return implode(DIRECTORY_SEPARATOR, ['vendor', 'bin', 'phpunit']); } } if ($this->fs->fileExists('phpunit.phar')) { if ($has_phpdbg) { return 'phpdbg -qrr phpunit.phar'; } else { return 'php phpunit.phar'; } } return ''; }