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\AfterTested;
18 use Behat\Testwork\Tester\Result\TestResult;
19 use Behat\Testwork\Tester\Setup\Teardown;
22 * Represents an event after scenario has been tested.
24 * @author Konstantin Kudryashov <ever.zet@gmail.com>
26 final class AfterScenarioTested extends ScenarioTested implements AfterTested
48 * @param Environment $env
49 * @param FeatureNode $feature
50 * @param Scenario $scenario
51 * @param TestResult $result
52 * @param Teardown $teardown
54 public function __construct(
61 parent::__construct($env);
63 $this->feature = $feature;
64 $this->scenario = $scenario;
65 $this->result = $result;
66 $this->teardown = $teardown;
74 public function getFeature()
76 return $this->feature;
80 * Returns scenario node.
82 * @return ScenarioNode
84 public function getScenario()
86 return $this->scenario;
90 * Returns current test result.
94 public function getTestResult()
100 * Returns current test teardown.
104 public function getTeardown()
106 return $this->teardown;