1 | <?php |
||
26 | class FailureShowListener implements EventSubscriberInterface |
||
27 | { |
||
28 | private $mink; |
||
29 | private $parameters; |
||
30 | |||
31 | /** |
||
32 | * Initializes initializer. |
||
33 | * |
||
34 | * @param Mink $mink |
||
35 | * @param array $parameters |
||
36 | */ |
||
37 | public function __construct(Mink $mink, array $parameters) |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | public static function getSubscribedEvents() |
||
52 | |||
53 | /** |
||
54 | * Shows last response of failed step with preconfigured command. |
||
55 | * |
||
56 | * Configuration is based on `behat.yml`: |
||
57 | * |
||
58 | * `show_auto` enable this listener (default to false) |
||
59 | * `show_cmd` command to run (`open %s` to open default browser on Mac) |
||
60 | * `show_tmp_dir` folder where to store temp files (default is system temp) |
||
61 | * |
||
62 | * @param AfterStepTested $event |
||
63 | * |
||
64 | * @throws \RuntimeException if show_cmd is not configured |
||
65 | */ |
||
66 | public function showFailedStepResponse(AfterStepTested $event) |
||
86 | } |
||
87 |