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