Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Behat / Snippet / Generator / SnippetGenerator.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\Generator;
12
13 use Behat\Behat\Snippet\Snippet;
14 use Behat\Behat\Snippet\SnippetRegistry;
15 use Behat\Gherkin\Node\StepNode;
16 use Behat\Testwork\Environment\Environment;
17
18 /**
19  * Generates snippet for a specific step in a specific environment.
20  *
21  * @see SnippetRegistry
22  *
23  * @author Konstantin Kudryashov <ever.zet@gmail.com>
24  */
25 interface SnippetGenerator
26 {
27     /**
28      * Checks if generator supports search query.
29      *
30      * @param Environment $environment
31      * @param StepNode    $step
32      *
33      * @return Boolean
34      */
35     public function supportsEnvironmentAndStep(Environment $environment, StepNode $step);
36
37     /**
38      * Generates snippet from search.
39      *
40      * @param Environment $environment
41      * @param StepNode    $step
42      *
43      * @return Snippet
44      */
45     public function generateSnippet(Environment $environment, StepNode $step);
46 }