Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Testwork / Environment / Exception / EnvironmentIsolationException.php
1 <?php
2
3 /*
4  * This file is part of the Behat Testwork.
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\Environment\Exception;
12
13 use Behat\Testwork\Environment\Environment;
14 use RuntimeException;
15
16 /**
17  * Represents exception thrown during environment isolation process.
18  *
19  * @author Konstantin Kudryashov <ever.zet@gmail.com>
20  */
21 final class EnvironmentIsolationException extends RuntimeException implements EnvironmentException
22 {
23     /**
24      * @var Environment
25      */
26     private $environment;
27     /**
28      * @var mixed
29      */
30     private $subject;
31
32     /**
33      * Initializes exception.
34      *
35      * @param string      $message
36      * @param Environment $environment
37      * @param mixed       $testSubject
38      */
39     public function __construct($message, Environment $environment, $testSubject = null)
40     {
41         $this->environment = $environment;
42         $this->subject = $testSubject;
43
44         parent::__construct($message);
45     }
46
47     /**
48      * Returns environment that caused exception.
49      *
50      * @return Environment
51      */
52     public function getEnvironment()
53     {
54         return $this->environment;
55     }
56
57     /**
58      * Returns test subject that caused exception.
59      *
60      * @return mixed
61      */
62     public function getSubject()
63     {
64         return $this->subject;
65     }
66 }