From 47bb3bf4cbc5b0a545b2628843dfcf406e9142ea Mon Sep 17 00:00:00 2001 From: Ivan Pidikseev Date: Fri, 16 Mar 2018 21:04:30 +0400 Subject: [PATCH] Added config options --- lib/atom-phpunit.js | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) 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}$`;