Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Testwork / Hook / Scope / BeforeSuiteScope.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\Testwork\Hook\Scope;
12
13 use Behat\Testwork\Specification\SpecificationIterator;
14 use Behat\Testwork\Environment\Environment;
15
16 /**
17  * Represents a scope for BeforeSuite hook.
18  *
19  * @author Konstantin Kudryashov <ever.zet@gmail.com>
20  */
21 final class BeforeSuiteScope implements SuiteScope
22 {
23     /**
24      * @var Environment
25      */
26     private $environment;
27     /**
28      * @var SpecificationIterator
29      */
30     private $iterator;
31
32     /**
33      * Initializes scope.
34      *
35      * @param Environment           $env
36      * @param SpecificationIterator $iterator
37      */
38     public function __construct(Environment $env, SpecificationIterator $iterator)
39     {
40         $this->environment = $env;
41         $this->iterator = $iterator;
42     }
43
44     /**
45      * {@inheritdoc}
46      */
47     public function getName()
48     {
49         return self::BEFORE;
50     }
51
52     /**
53      * {@inheritdoc}
54      */
55     public function getSuite()
56     {
57         return $this->environment->getSuite();
58     }
59
60     /**
61      * {@inheritdoc}
62      */
63     public function getEnvironment()
64     {
65         return $this->environment;
66     }
67
68     /**
69      * {@inheritdoc}
70      */
71     public function getSpecificationIterator()
72     {
73         return $this->iterator;
74     }
75 }