File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
src/Arachne/Codeception/Console/Input Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Arachne \Codeception \Console \Input ;
4+
5+ use Symfony \Component \Console \Input \InputDefinition ;
6+ use Symfony \Component \Console \Input \ArgvInput ;
7+
8+ /**
9+ * Codeception run command input for Symfony console
10+ *
11+ * This should only be used when debugging using xDebug and NetBeans (or different IDE).
12+ *
13+ * @author Jáchym Toušek
14+ */
15+ class RunTestInput extends ArgvInput
16+ {
17+
18+ public function __construct (InputDefinition $ definition = NULL )
19+ {
20+ $ parameters = array ($ _SERVER ['argv ' ][0 ], 'run ' );
21+
22+ if (isset ($ _SERVER ['argv ' ][1 ])) {
23+ $ filename = str_replace ('\\' , '/ ' , $ _SERVER ['argv ' ][1 ]);
24+ $ cwd = str_replace ('\\' , '/ ' , getcwd ()) . '/ ' ;
25+ if (strpos ($ filename , $ cwd ) === 0 ) {
26+ $ parameters [] = substr ($ filename , strlen ($ cwd ));
27+ }
28+ }
29+
30+ parent ::__construct ($ parameters , $ definition );
31+ }
32+
33+ }
You can’t perform that action at this time.
0 commit comments