Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Behat / EventDispatcher / Event / AfterScenarioTested.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\AfterTested;
18 use Behat\Testwork\Tester\Result\TestResult;
19 use Behat\Testwork\Tester\Setup\Teardown;
20
21 /**
22  * Represents an event after scenario has been tested.
23  *
24  * @author Konstantin Kudryashov <ever.zet@gmail.com>
25  */
26 final class AfterScenarioTested extends ScenarioTested implements AfterTested
27 {
28     /**
29      * @var FeatureNode
30      */
31     private $feature;
32     /**
33      * @var Scenario
34      */
35     private $scenario;
36     /**
37      * @var TestResult
38      */
39     private $result;
40     /**
41      * @var Teardown
42      */
43     private $teardown;
44
45     /**
46      * Initializes event
47      *
48      * @param Environment $env
49      * @param FeatureNode $feature
50      * @param Scenario    $scenario
51      * @param TestResult  $result
52      * @param Teardown    $teardown
53      */
54     public function __construct(
55         Environment $env,
56         FeatureNode $feature,
57         Scenario $scenario,
58         TestResult $result,
59         Teardown $teardown
60     ) {
61         parent::__construct($env);
62
63         $this->feature = $feature;
64         $this->scenario = $scenario;
65         $this->result = $result;
66         $this->teardown = $teardown;
67     }
68
69     /**
70      * Returns feature.
71      *
72      * @return FeatureNode
73      */
74     public function getFeature()
75     {
76         return $this->feature;
77     }
78
79     /**
80      * Returns scenario node.
81      *
82      * @return ScenarioNode
83      */
84     public function getScenario()
85     {
86         return $this->scenario;
87     }
88
89     /**
90      * Returns current test result.
91      *
92      * @return TestResult
93      */
94     public function getTestResult()
95     {
96         return $this->result;
97     }
98
99     /**
100      * Returns current test teardown.
101      *
102      * @return Teardown
103      */
104     public function getTeardown()
105     {
106         return $this->teardown;
107     }
108 }