4 * This file is part of the Behat.
5 * (c) Konstantin Kudryashov <ever.zet@gmail.com>
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
11 namespace Behat\Behat\Snippet\Generator;
13 use Behat\Behat\Snippet\Snippet;
14 use Behat\Behat\Snippet\SnippetRegistry;
15 use Behat\Gherkin\Node\StepNode;
16 use Behat\Testwork\Environment\Environment;
19 * Generates snippet for a specific step in a specific environment.
21 * @see SnippetRegistry
23 * @author Konstantin Kudryashov <ever.zet@gmail.com>
25 interface SnippetGenerator
28 * Checks if generator supports search query.
30 * @param Environment $environment
31 * @param StepNode $step
35 public function supportsEnvironmentAndStep(Environment $environment, StepNode $step);
38 * Generates snippet from search.
40 * @param Environment $environment
41 * @param StepNode $step
45 public function generateSnippet(Environment $environment, StepNode $step);