Skip to content

Commit 33bfea7

Browse files
committed
PHP Unit command option to display notices
1 parent 1cf1cd0 commit 33bfea7

1 file changed

Lines changed: 22 additions & 7 deletions

File tree

mdk/commands/phpunit.py

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ class PhpunitCommand(Command):
9595
'help': 'display details on tests that triggered warnings (From 5.0)'
9696
},
9797
),
98+
(
99+
['-n', '--display-notices'],
100+
{
101+
'action': 'store_true',
102+
'dest': 'displaynotices',
103+
'help': 'display details on tests that triggered notices (From 5.0)'
104+
},
105+
),
98106
(
99107
['-c', '--coverage'],
100108
{
@@ -166,14 +174,21 @@ def run(self, args):
166174
repeat = None
167175

168176
kwargs = {
169-
'coverage': args.coverage,
170-
'filter': args.filter,
171-
'testcase': args.testcase,
172-
'testsuite': testsuite,
173-
'unittest': str(M.get_file_path(args.unittest)) if args.unittest else None,
177+
'coverage':
178+
args.coverage,
179+
'filter':
180+
args.filter,
181+
'testcase':
182+
args.testcase,
183+
'testsuite':
184+
testsuite,
185+
'unittest':
186+
str(M.get_file_path(args.unittest)) if args.unittest else None,
174187
'stopon': [] if not args.stoponfailure else ['failure'],
175-
'repeat': repeat,
176-
'display': ['warnings'] if args.displaywarnings and M.branch_compare(500) else None
188+
'repeat':
189+
repeat,
190+
'display': (['warnings'] if args.displaywarnings and M.branch_compare(500) else None) +
191+
(['notices'] if args.displaynotices and M.branch_compare(500) else None)
177192
}
178193

179194
if args.run:

0 commit comments

Comments
 (0)