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\BeforeTested;
20 * Represents a BeforeBackgroundTested event.
22 * @author Konstantin Kudryashov <ever.zet@gmail.com>
24 final class BeforeBackgroundTested extends BackgroundTested implements BeforeTested
38 * @param Environment $env
39 * @param FeatureNode $feature
40 * @param BackgroundNode $background
42 public function __construct(Environment $env, FeatureNode $feature, BackgroundNode $background)
44 parent::__construct($env);
46 $this->feature = $feature;
47 $this->background = $background;
55 public function getFeature()
57 return $this->feature;
61 * Returns scenario node.
63 * @return ScenarioInterface
65 public function getScenario()
67 return $this->background;
71 * Returns background node.
73 * @return BackgroundNode
75 public function getBackground()
77 return $this->background;