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\EventDispatcher\Event;
13 use Behat\Gherkin\Node\FeatureNode;
14 use Behat\Gherkin\Node\ScenarioLikeInterface as Scenario;
15 use Behat\Gherkin\Node\ScenarioNode;
16 use Behat\Testwork\Environment\Environment;
17 use Behat\Testwork\EventDispatcher\Event\BeforeTeardown;
18 use Behat\Testwork\Tester\Result\TestResult;
21 * Represents an event before scenario teardown.
23 * @author Konstantin Kudryashov <ever.zet@gmail.com>
25 final class BeforeScenarioTeardown extends ScenarioTested implements BeforeTeardown
43 * @param Environment $env
44 * @param FeatureNode $feature
45 * @param Scenario $scenario
46 * @param TestResult $result
48 public function __construct(
54 parent::__construct($env);
56 $this->feature = $feature;
57 $this->scenario = $scenario;
58 $this->result = $result;
66 public function getFeature()
68 return $this->feature;
72 * Returns scenario node.
74 * @return ScenarioNode
76 public function getScenario()
78 return $this->scenario;
82 * Returns current test result.
86 public function getTestResult()