diff --git a/lib/atom-phpunit.js b/lib/atom-phpunit.js index 5bc96e6..8976efb 100644 --- a/lib/atom-phpunit.js +++ b/lib/atom-phpunit.js @@ -40,12 +40,26 @@ export default { type: 'string', default: '/usr/local/bin/phpunit' }, - outputViewFontSize: { + configPath: { order: 6, + title: 'PHPUnit Config Path', + description: 'Set the PHPUnit config path if your project uses not standart configuration path.', + type: 'string', + default: 'phpunit.xml' + }, + outputViewFontSize: { + order: 7, title: 'Output View Font Size', description: 'Set the font size of the PHPUnit Output view', type: 'string', default: '14px' + }, + runnerSpecificOptions: { + order: 8, + title: 'PHPUnit specific options', + description: 'PHPUnit specific options to run ', + type: 'string', + default: '' } }, @@ -184,6 +198,12 @@ export default { else cmd = atom.config.get('atom-phpunit.phpunitPath'); + if (atom.config.get('atom-phpunit.configPath') !== 'phpunit.xml') + cmd += ' --configuration=' + atom.config.get('atom-phpunit.configPath'); + + if (atom.config.get('atom-phpunit.runnerSpecificOptions')) + cmd += ' ' + atom.config.get('atom-phpunit.runnerSpecificOptions'); + if (typeof functionName !== 'undefined') cmd += ` --filter=${functionName}$`;