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\Hook\Scope\AfterTestScope;
17 use Behat\Testwork\Suite\Suite;
18 use Behat\Testwork\Tester\Result\TestResult;
21 * Represents an AfterScenario hook scope.
23 * @author Konstantin Kudryashov <ever.zet@gmail.com>
25 final class AfterScenarioScope implements ScenarioScope, AfterTestScope
47 * @param Environment $env
48 * @param FeatureNode $feature
49 * @param Scenario $scenario
50 * @param TestResult $result
52 public function __construct(Environment $env, FeatureNode $feature, Scenario $scenario, TestResult $result)
54 $this->environment = $env;
55 $this->feature = $feature;
56 $this->scenario = $scenario;
57 $this->result = $result;
61 * Returns hook scope name.
65 public function getName()
75 public function getSuite()
77 return $this->environment->getSuite();
81 * Returns hook environment.
85 public function getEnvironment()
87 return $this->environment;
91 * Returns scope feature.
95 public function getFeature()
97 return $this->feature;
105 public function getScenario()
107 return $this->scenario;
111 * Returns test result.
115 public function getTestResult()
117 return $this->result;