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