Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Behat / EventDispatcher / Event / AfterBackgroundTested.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\BackgroundNode;
14 use Behat\Gherkin\Node\FeatureNode;
15 use Behat\Gherkin\Node\ScenarioInterface;
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 in which background was tested.
23  *
24  * @author Konstantin Kudryashov <ever.zet@gmail.com>
25  */
26 final class AfterBackgroundTested extends BackgroundTested implements AfterTested
27 {
28     /**
29      * @var FeatureNode
30      */
31     private $feature;
32     /**
33      * @var BackgroundNode
34      */
35     private $background;
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 BackgroundNode $background
51      * @param TestResult     $result
52      * @param Teardown       $teardown
53      */
54     public function __construct(
55         Environment $env,
56         FeatureNode $feature,
57         BackgroundNode $background,
58         TestResult $result,
59         Teardown $teardown
60     ) {
61         parent::__construct($env);
62
63         $this->feature = $feature;
64         $this->background = $background;
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 ScenarioInterface
83      */
84     public function getScenario()
85     {
86         return $this->background;
87     }
88
89     /**
90      * Returns background node.
91      *
92      * @return BackgroundNode
93      */
94     public function getBackground()
95     {
96         return $this->background;
97     }
98
99     /**
100      * Returns current test result.
101      *
102      * @return TestResult
103      */
104     public function getTestResult()
105     {
106         return $this->result;
107     }
108
109     /**
110      * Returns current test teardown.
111      *
112      * @return Teardown
113      */
114     public function getTeardown()
115     {
116         return $this->teardown;
117     }
118 }