1 | <?php |
||
13 | class FixturesHookListener implements EventSubscriberInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var string feature|scenario |
||
17 | */ |
||
18 | private $lifetime; |
||
19 | |||
20 | /** |
||
21 | * @var object |
||
22 | */ |
||
23 | private $fixtureService; |
||
24 | |||
25 | /** |
||
26 | * Constructor. |
||
27 | * |
||
28 | * @param string $lifetime |
||
29 | */ |
||
30 | public function __construct($lifetime) |
||
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | public static function getSubscribedEvents() |
||
50 | |||
51 | /** |
||
52 | * Set fixture service. |
||
53 | * |
||
54 | * @param \BehatExtension\DoctrineDataFixturesExtension\Service\FixtureService $service |
||
55 | */ |
||
56 | public function setFixtureService($service) |
||
60 | |||
61 | /** |
||
62 | * Listens to "exercise.before" event. |
||
63 | * |
||
64 | * @param \Behat\Testwork\Tester\Event\ExerciseCompleted $event |
||
65 | */ |
||
66 | public function beforeExercise(ExerciseCompleted $event) |
||
71 | |||
72 | /** |
||
73 | * Listens to "feature.before" event. |
||
74 | * |
||
75 | * @param \Behat\Behat\Tester\Event\FeatureTested $event |
||
76 | */ |
||
77 | public function beforeFeature(FeatureTested $event) |
||
85 | |||
86 | /** |
||
87 | * Listens to "feature.after" event. |
||
88 | * |
||
89 | * @param \Behat\Behat\Tester\Event\FeatureTested $event |
||
90 | */ |
||
91 | public function afterFeature(FeatureTested $event) |
||
100 | |||
101 | /** |
||
102 | * Listens to "scenario.before" and "outline.example.before" event. |
||
103 | * |
||
104 | * @param \Behat\Behat\Tester\Event\AbstractScenarioTested $event |
||
105 | */ |
||
106 | public function beforeScenario(ScenarioTested $event) |
||
115 | |||
116 | /** |
||
117 | * Listens to "scenario.after" and "outline.example.after" event. |
||
118 | * |
||
119 | * @param \Behat\Behat\Tester\Event\AbstractScenarioTested $event |
||
120 | */ |
||
121 | public function afterScenario(ScenarioTested $event) |
||
130 | } |
||
131 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.