Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Behat / EventDispatcher / Event / BeforeScenarioTeardown.php
1 <?php
2
3 /*
4  * This file is part of the Behat.
5  * (c) Konstantin Kudryashov <ever.zet@gmail.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 namespace Behat\Behat\EventDispatcher\Event;
12
13 use Behat\Gherkin\Node\FeatureNode;
14 use Behat\Gherkin\Node\ScenarioLikeInterface as Scenario;
15 use Behat\Gherkin\Node\ScenarioNode;
16 use Behat\Testwork\Environment\Environment;
17 use Behat\Testwork\EventDispatcher\Event\BeforeTeardown;
18 use Behat\Testwork\Tester\Result\TestResult;
19
20 /**
21  * Represents an event before scenario teardown.
22  *
23  * @author Konstantin Kudryashov <ever.zet@gmail.com>
24  */
25 final class BeforeScenarioTeardown extends ScenarioTested implements BeforeTeardown
26 {
27     /**
28      * @var FeatureNode
29      */
30     private $feature;
31     /**
32      * @var Scenario
33      */
34     private $scenario;
35     /**
36      * @var TestResult
37      */
38     private $result;
39
40     /**
41      * Initializes event
42      *
43      * @param Environment $env
44      * @param FeatureNode $feature
45      * @param Scenario    $scenario
46      * @param TestResult  $result
47      */
48     public function __construct(
49         Environment $env,
50         FeatureNode $feature,
51         Scenario $scenario,
52         TestResult $result
53     ) {
54         parent::__construct($env);
55
56         $this->feature = $feature;
57         $this->scenario = $scenario;
58         $this->result = $result;
59     }
60
61     /**
62      * Returns feature.
63      *
64      * @return FeatureNode
65      */
66     public function getFeature()
67     {
68         return $this->feature;
69     }
70
71     /**
72      * Returns scenario node.
73      *
74      * @return ScenarioNode
75      */
76     public function getScenario()
77     {
78         return $this->scenario;
79     }
80
81     /**
82      * Returns current test result.
83      *
84      * @return TestResult
85      */
86     public function getTestResult()
87     {
88         return $this->result;
89     }
90 }