1 | <?php |
||
22 | class Command extends ConsoleCommand |
||
23 | { |
||
24 | use HasEventEmitterTrait; |
||
25 | |||
26 | /** |
||
27 | * @var \Peridot\Runner\RunnerInterface |
||
28 | */ |
||
29 | protected $runner; |
||
30 | |||
31 | /** |
||
32 | * @var \Peridot\Configuration |
||
33 | */ |
||
34 | protected $configuration; |
||
35 | |||
36 | /** |
||
37 | * @var \Peridot\Reporter\ReporterFactory |
||
38 | */ |
||
39 | protected $factory; |
||
40 | |||
41 | /** |
||
42 | * @var \Peridot\Runner\SuiteLoaderInterface |
||
43 | */ |
||
44 | protected $loader; |
||
45 | |||
46 | /** |
||
47 | * @param RunnerInterface $runner |
||
48 | * @param Configuration $configuration |
||
49 | * @param ReporterFactory $factory |
||
50 | * @param EventEmitterInterface $eventEmitter |
||
51 | */ |
||
52 | public function __construct( |
||
64 | |||
65 | /** |
||
66 | * Set the loader used by the Peridot command |
||
67 | * |
||
68 | * @param SuiteLoaderInterface $loader |
||
69 | * @return $this |
||
70 | */ |
||
71 | public function setLoader(SuiteLoaderInterface $loader) |
||
76 | |||
77 | /** |
||
78 | * Fetch the loader used by the Peridot command. Defaults to |
||
79 | * a glob based loader |
||
80 | * |
||
81 | * @return SuiteLoaderInterface |
||
82 | */ |
||
83 | public function getLoader() |
||
90 | |||
91 | /** |
||
92 | * Set the suite runner used by the Peridot command. |
||
93 | * |
||
94 | * @param RunnerInterface $runner |
||
95 | * @return $this |
||
96 | */ |
||
97 | public function setRunner(RunnerInterface $runner) |
||
102 | |||
103 | /** |
||
104 | * Return the runner used by the Peridot command. Defaults to |
||
105 | * an instance of Peridot\Runner\Runner. |
||
106 | * |
||
107 | * @return RunnerInterface |
||
108 | */ |
||
109 | public function getRunner() |
||
113 | |||
114 | /** |
||
115 | * {@inheritdoc} |
||
116 | * |
||
117 | * @return string |
||
118 | */ |
||
119 | public function getSynopsis($short = false) |
||
123 | |||
124 | /** |
||
125 | * Load and run Suites and Tests |
||
126 | * |
||
127 | * @param InputInterface $input |
||
128 | * @param OutputInterface $output |
||
129 | * @return int |
||
130 | */ |
||
131 | protected function execute(InputInterface $input, OutputInterface $output) |
||
147 | |||
148 | /** |
||
149 | * Output available reporters |
||
150 | * |
||
151 | * @param OutputInterface $output |
||
152 | */ |
||
153 | protected function listReporters(OutputInterface $output) |
||
161 | |||
162 | /** |
||
163 | * Return the result as an integer. |
||
164 | * |
||
165 | * @return int |
||
166 | */ |
||
167 | protected function getResult() |
||
184 | } |
||
185 |