Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Behat / EventDispatcher / Event / AfterBackgroundSetup.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\AfterSetup;
18 use Behat\Testwork\Tester\Setup\Setup;
19
20 /**
21  * Represents an event right after background was setup for testing.
22  *
23  * @author Konstantin Kudryashov <ever.zet@gmail.com>
24  */
25 final class AfterBackgroundSetup extends BackgroundTested implements AfterSetup
26 {
27     /**
28      * @var FeatureNode
29      */
30     private $feature;
31     /**
32      * @var BackgroundNode
33      */
34     private $background;
35     /**
36      * @var Setup
37      */
38     private $setup;
39
40     /**
41      * Initializes event.
42      *
43      * @param Environment    $env
44      * @param FeatureNode    $feature
45      * @param BackgroundNode $background
46      * @param Setup          $setup
47      */
48     public function __construct(Environment $env, FeatureNode $feature, BackgroundNode $background, Setup $setup)
49     {
50         parent::__construct($env);
51
52         $this->feature = $feature;
53         $this->background = $background;
54         $this->setup = $setup;
55     }
56
57     /**
58      * Returns feature.
59      *
60      * @return FeatureNode
61      */
62     public function getFeature()
63     {
64         return $this->feature;
65     }
66
67     /**
68      * Returns scenario node.
69      *
70      * @return ScenarioInterface
71      */
72     public function getScenario()
73     {
74         return $this->background;
75     }
76
77     /**
78      * Returns background node.
79      *
80      * @return BackgroundNode
81      */
82     public function getBackground()
83     {
84         return $this->background;
85     }
86
87     /**
88      * Returns current test setup.
89      *
90      * @return Setup
91      */
92     public function getSetup()
93     {
94         return $this->setup;
95     }
96 }