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