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\Hook\Scope;
13 use Behat\Gherkin\Node\FeatureNode;
14 use Behat\Gherkin\Node\ScenarioInterface as Scenario;
15 use Behat\Testwork\Environment\Environment;
16 use Behat\Testwork\Suite\Suite;
19 * Represents a BeforeScenario hook scope.
21 * @author Konstantin Kudryashov <ever.zet@gmail.com>
23 final class BeforeScenarioScope implements ScenarioScope
41 * @param Environment $env
42 * @param FeatureNode $feature
43 * @param Scenario $scenario
45 public function __construct(Environment $env, FeatureNode $feature, Scenario $scenario)
47 $this->environment = $env;
48 $this->feature = $feature;
49 $this->scenario = $scenario;
53 * Returns hook scope name.
57 public function getName()
67 public function getSuite()
69 return $this->environment->getSuite();
73 * Returns hook environment.
77 public function getEnvironment()
79 return $this->environment;
83 * Returns scope feature.
87 public function getFeature()
89 return $this->feature;
97 public function getScenario()
99 return $this->scenario;