Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Behat / Tester / Result / FailedStepSearchResult.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\Result;
12
13 use Behat\Behat\Definition\Exception\SearchException;
14 use Behat\Testwork\Tester\Result\ExceptionResult;
15
16 /**
17  * Represents a step test result with a failed definition search.
18  *
19  * @author Konstantin Kudryashov <ever.zet@gmail.com>
20  */
21 final class FailedStepSearchResult implements StepResult, ExceptionResult
22 {
23     /**
24      * @var SearchException
25      */
26     private $searchException;
27
28     /**
29      * Initializes result.
30      *
31      * @param SearchException $searchException
32      */
33     public function __construct(SearchException $searchException)
34     {
35         $this->searchException = $searchException;
36     }
37
38     /**
39      * {@inheritdoc}
40      */
41     public function hasException()
42     {
43         return true;
44     }
45
46     /**
47      * {@inheritdoc}
48      */
49     public function getException()
50     {
51         return $this->searchException;
52     }
53
54     /**
55      * {@inheritdoc}
56      */
57     public function isPassed()
58     {
59         return false;
60     }
61
62     /**
63      * {@inheritdoc}
64      */
65     public function getResultCode()
66     {
67         return self::FAILED;
68     }
69 }