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\Behat\Tester\Result\StepResult;
14 use Behat\Gherkin\Node\FeatureNode;
15 use Behat\Gherkin\Node\StepNode;
16 use Behat\Testwork\Environment\Environment;
17 use Behat\Testwork\Hook\Scope\AfterTestScope;
18 use Behat\Testwork\Suite\Suite;
19 use Behat\Testwork\Tester\Result\TestResult;
22 * Represents an AfterStep hook scope.
24 * @author Konstantin Kudryashov <ever.zet@gmail.com>
26 final class AfterStepScope implements StepScope, AfterTestScope
48 * @param Environment $env
49 * @param FeatureNode $feature
50 * @param StepNode $step
51 * @param StepResult $result
53 public function __construct(Environment $env, FeatureNode $feature, StepNode $step, StepResult $result)
55 $this->environment = $env;
56 $this->feature = $feature;
58 $this->result = $result;
62 * Returns hook scope name.
66 public function getName()
76 public function getSuite()
78 return $this->environment->getSuite();
82 * Returns hook environment.
86 public function getEnvironment()
88 return $this->environment;
92 * Returns scope feature.
96 public function getFeature()
98 return $this->feature;
102 * Returns scope step.
106 public function getStep()
112 * Returns test result.
116 public function getTestResult()
118 return $this->result;