Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Testwork / EventDispatcher / Event / AfterSuiteTested.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\EventDispatcher\Event;
12
13 use Behat\Testwork\Environment\Environment;
14 use Behat\Testwork\Specification\SpecificationIterator;
15 use Behat\Testwork\Tester\Result\TestResult;
16 use Behat\Testwork\Tester\Setup\Teardown;
17
18 /**
19  * Represents an event in which suite was tested.
20  *
21  * @author Konstantin Kudryashov <ever.zet@gmail.com>
22  */
23 final class AfterSuiteTested extends SuiteTested implements AfterTested
24 {
25     /**
26      * @var SpecificationIterator
27      */
28     private $iterator;
29     /**
30      * @var TestResult
31      */
32     private $result;
33     /**
34      * @var Teardown
35      */
36     private $teardown;
37
38     /**
39      * Initializes event.
40      *
41      * @param Environment           $env
42      * @param SpecificationIterator $iterator
43      * @param TestResult            $result
44      * @param Teardown              $teardown
45      */
46     public function __construct(
47         Environment $env,
48         SpecificationIterator $iterator,
49         TestResult $result,
50         Teardown $teardown
51     ) {
52         parent::__construct($env);
53
54         $this->iterator = $iterator;
55         $this->result = $result;
56         $this->teardown = $teardown;
57     }
58
59     /**
60      * Returns specification iterator.
61      *
62      * @return SpecificationIterator
63      */
64     public function getSpecificationIterator()
65     {
66         return $this->iterator;
67     }
68
69     /**
70      * Returns current test result.
71      *
72      * @return TestResult
73      */
74     public function getTestResult()
75     {
76         return $this->result;
77     }
78
79     /**
80      * Returns current test teardown.
81      *
82      * @return Teardown
83      */
84     public function getTeardown()
85     {
86         return $this->teardown;
87     }
88 }