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