Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Behat / EventDispatcher / Event / BeforeBackgroundTested.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\BeforeTested;
18
19 /**
20  * Represents a BeforeBackgroundTested event.
21  *
22  * @author Konstantin Kudryashov <ever.zet@gmail.com>
23  */
24 final class BeforeBackgroundTested extends BackgroundTested implements BeforeTested
25 {
26     /**
27      * @var FeatureNode
28      */
29     private $feature;
30     /**
31      * @var BackgroundNode
32      */
33     private $background;
34
35     /**
36      * Initializes event.
37      *
38      * @param Environment    $env
39      * @param FeatureNode    $feature
40      * @param BackgroundNode $background
41      */
42     public function __construct(Environment $env, FeatureNode $feature, BackgroundNode $background)
43     {
44         parent::__construct($env);
45
46         $this->feature = $feature;
47         $this->background = $background;
48     }
49
50     /**
51      * Returns feature.
52      *
53      * @return FeatureNode
54      */
55     public function getFeature()
56     {
57         return $this->feature;
58     }
59
60     /**
61      * Returns scenario node.
62      *
63      * @return ScenarioInterface
64      */
65     public function getScenario()
66     {
67         return $this->background;
68     }
69
70     /**
71      * Returns background node.
72      *
73      * @return BackgroundNode
74      */
75     public function getBackground()
76     {
77         return $this->background;
78     }
79 }