Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Behat / Snippet / Exception / EnvironmentSnippetGenerationException.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\Snippet\Exception;
12
13 use Behat\Testwork\Environment\Environment;
14 use RuntimeException;
15
16 /**
17  * Represents exception caused by an attempt to generate snippet for unsupported environment.
18  *
19  * @author Konstantin Kudryashov <ever.zet@gmail.com>
20  */
21 final class EnvironmentSnippetGenerationException extends RuntimeException implements SnippetException
22 {
23     /**
24      * @var Environment
25      */
26     private $environment;
27
28     /**
29      * Initializes exception.
30      *
31      * @param string      $message
32      * @param Environment $environment
33      */
34     public function __construct($message, Environment $environment)
35     {
36         $this->environment = $environment;
37
38         parent::__construct($message);
39     }
40
41     /**
42      * Returns environment that caused exception.
43      *
44      * @return Environment
45      */
46     public function getEnvironment()
47     {
48         return $this->environment;
49     }
50 }