X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FBehat%2FDefinition%2FDefinitionFinder.php;fp=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FBehat%2FDefinition%2FDefinitionFinder.php;h=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=14d27639349fe706fca91c861c2717d3ffd5993d;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;p=yaffs-website diff --git a/vendor/behat/behat/src/Behat/Behat/Definition/DefinitionFinder.php b/vendor/behat/behat/src/Behat/Behat/Definition/DefinitionFinder.php deleted file mode 100644 index 14d276393..000000000 --- a/vendor/behat/behat/src/Behat/Behat/Definition/DefinitionFinder.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Behat\Behat\Definition; - -use Behat\Behat\Definition\Search\SearchEngine; -use Behat\Gherkin\Node\FeatureNode; -use Behat\Gherkin\Node\StepNode; -use Behat\Testwork\Environment\Environment; - -/** - * Finds specific step definition in environment using registered search engines. - * - * @author Konstantin Kudryashov - */ -final class DefinitionFinder -{ - /** - * @var SearchEngine[] - */ - private $engines = array(); - - /** - * Registers definition search engine. - * - * @param SearchEngine $searchEngine - */ - public function registerSearchEngine(SearchEngine $searchEngine) - { - $this->engines[] = $searchEngine; - } - - /** - * Searches definition for a provided step in a provided environment. - * - * @param Environment $environment - * @param FeatureNode $feature - * @param StepNode $step - * - * @return SearchResult - */ - public function findDefinition(Environment $environment, FeatureNode $feature, StepNode $step) - { - foreach ($this->engines as $engine) { - $result = $engine->searchDefinition($environment, $feature, $step); - - if (null !== $result && $result->hasMatch()) { - return $result; - } - } - - return new SearchResult(); - } -}